--- - name: Ensure we pass needed parameter when: - not (cifmw_bm_sno | default(false) | bool) ansible.builtin.assert: that: - cifmw_use_libvirt is defined - cifmw_use_libvirt | bool msg: >- Please ensure you pass "cifmw_use_libvirt: true" to the deployment! quiet: true - name: Verify ansible_host is defined in inventory when: - cifmw_target_host is defined - cifmw_target_host != 'localhost' delegate_to: localhost ansible.builtin.assert: that: ansible_host != 'localhost' msg: >- Please ensure you define your ansible_host in your inventory file https://ci-framework.readthedocs.io/en/latest/quickstart/03_deploy_infra.html#inventory-file quiet: true - name: Verify ansible_connection is set to "local" in provided inventory delegate_to: localhost ansible.builtin.assert: that: ansible_connection == 'local' msg: >- Please ensure you define your ansible_connection to local for localhost in your inventory file https://ci-framework.readthedocs.io/en/latest/quickstart/03_deploy_infra.html#inventory-file quiet: true - name: Verify we are running on a supported hypervisor OS version ansible.builtin.assert: that: - ansible_distribution in cifmw_reproducer_supported_hypervisor_os - ansible_distribution_version | float >= cifmw_reproducer_supported_hypervisor_os[ansible_distribution].minimum_version msg: >- Please ensure host: {{ cifmw_target_host | default('localhost') }} is running a supported OS. {{ ansible_distribution_version }} is less than the minimum supported version of {{ cifmw_reproducer_supported_hypervisor_os[ansible_distribution].minimum_version }} https://ci-framework.readthedocs.io/en/latest/quickstart/02_prepare_env.html#tested-environment - name: Validate the hardware requirments when: cifmw_reproducer_minimum_hardware_requirements is defined block: - name: Verfy CPU count exceeds minimum defined in scenario file when: cifmw_reproducer_minimum_hardware_requirements.vcpu is defined ansible.builtin.assert: that: ansible_processor_vcpus >= {{ cifmw_reproducer_minimum_hardware_requirements.vcpu }} msg: >- {{ ansible_hostname }} has {{ ansible_processor_vcpus }} VCPU but must have >= {{ cifmw_reproducer_minimum_hardware_requirements.vcpu }} VCPU as defined by the scenario file - name: Validate memory amount exceeds minimum defined in scenario file when: cifmw_reproducer_minimum_hardware_requirements.memory is defined vars: _memory_bytes: "{{ ansible_memtotal_mb * 1048576 }}" ansible.builtin.assert: that: _memory_bytes | int >= cifmw_reproducer_minimum_hardware_requirements.memory | human_to_bytes msg: >- {{ ansible_hostname }} has {{ _memory_bytes | int | human_readable }} of memory but must have >= {{ cifmw_reproducer_minimum_hardware_requirements.memory }} memory as defined by the scenario file - name: Validate home disk size exceeds minimum defined in scenario file when: cifmw_reproducer_minimum_hardware_requirements.memory is defined vars: _home_disk_size: >- {{ ansible_mounts | selectattr('mount', 'equalto', '/home') | map(attribute='size_total') | first | human_readable }} ansible.builtin.assert: that: _home_disk_size | human_to_bytes >= cifmw_reproducer_minimum_hardware_requirements.disk | human_to_bytes msg: >- {{ ansible_hostname }} home mount is {{ _home_disk_size }} but must have >= {{ cifmw_reproducer_minimum_hardware_requirements.disk }} as defined by the scenario file. - name: Verify cifmw_network_dnsmasq_config isn't set ansible.builtin.assert: quiet: true that: - cifmw_network_dnsmasq_config is undefined or cifmw_network_dnsmasq_config | length == 0 msg: >- cifmw_network_dnsmasq_config is set and not empty. This feature is NOT supported anymore. Please contact the CI Framework team to check your configuration, and see if you really need to pass anything to dnsmasq.