--- # tasks file for system_info - name: Include OS-specific variables include_vars: "{{ ansible_os_family }}.yml" ignore_errors: true tags: [always] - name: Validate required variables assert: that: - system_info_stats_base_dir is defined - system_info_stats_base_dir | length > 0 fail_msg: "Required variable 'system_info_stats_base_dir' is not defined or empty" tags: [validate] - name: Set statistics directory path set_fact: system_info_stats_dir: "{{ system_info_stats_base_dir }}/{{ ansible_fqdn }}" tags: [always] - name: Create statistics directory on control node file: path: "{{ system_info_stats_dir }}" state: directory mode: '0755' delegate_to: localhost become: false when: system_info_create_stats_dir | bool tags: [install, setup] - name: Include installation tasks include_tasks: install.yml tags: [install] - name: Include system information gathering tasks include_tasks: gather_system.yml when: system_info_gather_system | bool tags: [gather, system] - name: Include CPU information gathering tasks include_tasks: gather_cpu.yml when: system_info_gather_cpu | bool tags: [gather, cpu] - name: Include GPU information gathering tasks include_tasks: gather_gpu.yml when: system_info_gather_gpu | bool tags: [gather, gpu] - name: Include memory information gathering tasks include_tasks: gather_memory.yml when: system_info_gather_memory | bool tags: [gather, memory] - name: Include disk information gathering tasks include_tasks: gather_disk.yml when: system_info_gather_disk | bool tags: [gather, disk] - name: Include network information gathering tasks include_tasks: gather_network.yml when: system_info_gather_network | bool tags: [gather, network] - name: Include hypervisor detection tasks include_tasks: detect_hypervisor.yml when: system_info_detect_hypervisor | bool tags: [gather, hypervisor] - name: Include statistics aggregation and export tasks include_tasks: export_stats.yml tags: [export, statistics] - name: Include validation tasks include_tasks: validate.yml tags: [validate, health-check]