diff --git a/tasks/filter_team_devices.yml b/tasks/filter_team_devices.yml index 33cf2e0..d4714c4 100644 --- a/tasks/filter_team_devices.yml +++ b/tasks/filter_team_devices.yml @@ -32,4 +32,4 @@ msg: >- Only Team devices {{ team_if | join(', ') }} are present. Teaming is not supported. - when: (otopi_host_net | length == 0) + when: (otopi_host_net.ansible_facts.otopi_host_net | length == 0) diff --git a/tasks/pre_checks/001_validate_network_interfaces.yml b/tasks/pre_checks/001_validate_network_interfaces.yml index 1b731ea..e4f7f54 100644 --- a/tasks/pre_checks/001_validate_network_interfaces.yml +++ b/tasks/pre_checks/001_validate_network_interfaces.yml @@ -68,12 +68,12 @@ host_net: >- {{ [bridge_interface] if bridge_interface is defined else bb_filtered_list.results | reject('skipped') | map(attribute='bond_item.ansible_facts.otopi_net_host') | list }} - register: host_net - debug: var=host_net - import_tasks: filter_team_devices.yml - name: Validate selected bridge interface if management bridge does not exist fail: msg: The selected network interface is not valid when: - he_bridge_if not in otopi_host_net and bridge_interface is not defined and not he_just_collect_network_interfaces + he_bridge_if not in otopi_host_net.ansible_facts.otopi_host_net and bridge_interface is not defined and + not he_just_collect_network_interfaces ... diff --git a/tasks/pre_checks/define_variables.yml b/tasks/pre_checks/define_variables.yml index 408e2c8..64086ee 100644 --- a/tasks/pre_checks/define_variables.yml +++ b/tasks/pre_checks/define_variables.yml @@ -16,7 +16,6 @@ - name: Define he_cloud_init_host_name set_fact: he_cloud_init_host_name: "{{ he_fqdn }}" - register: he_cloud_init_host_name - debug: var=he_cloud_init_host_name - name: Define he_vm_uuid diff --git a/tasks/pre_checks/validate_mac_address.yml b/tasks/pre_checks/validate_mac_address.yml index aebc42b..c09537f 100644 --- a/tasks/pre_checks/validate_mac_address.yml +++ b/tasks/pre_checks/validate_mac_address.yml @@ -10,7 +10,6 @@ set_fact: he_vm_mac_addr: >- {{ mac_address.stdout if he_vm_mac_addr is not defined or he_vm_mac_addr is none else he_vm_mac_addr }} - register: he_vm_mac_addr - name: Fail if MAC address structure is incorrect fail: msg: "Invalid unicast MAC address format. Got {{ he_vm_mac_addr }}" diff --git a/tasks/pre_checks/validate_memory_size.yml b/tasks/pre_checks/validate_memory_size.yml index 6f7573b..4edddd8 100644 --- a/tasks/pre_checks/validate_memory_size.yml +++ b/tasks/pre_checks/validate_memory_size.yml @@ -14,13 +14,11 @@ - name: Set Max memory set_fact: max_mem: "{{ free_mem.stdout|int + cached_mem.stdout|int - he_reserved_memory_MB + he_avail_memory_grace_MB }}" - register: max_mem - debug: var=max_mem - name: set he_mem_size_MB to max available if not defined set_fact: he_mem_size_MB: "{{ he_mem_size_MB if he_mem_size_MB != 'max' else max_mem }}" - register: he_mem_size_MB - debug: var=he_mem_size_MB - name: Fail if available memory is less then the minimal requirement diff --git a/tasks/pre_checks/validate_vcpus_count.yml b/tasks/pre_checks/validate_vcpus_count.yml index e0100d6..a9d7944 100644 --- a/tasks/pre_checks/validate_vcpus_count.yml +++ b/tasks/pre_checks/validate_vcpus_count.yml @@ -8,13 +8,11 @@ - name: Set he_maxvcpus set_fact: he_maxvcpus: "{{ max_cpus.stdout }}" - register: he_maxvcpus - debug: var=he_maxvcpus - name: Set he_vcpus to maximum amount if not defined set_fact: he_vcpus: "{{ he_vcpus if he_vcpus != 'max' else he_maxvcpus }}" - register: he_vcpus - debug: var=he_vcpus - name: Check number of chosen CPUs