diff --git a/playbooks/manual/ocp4-place-ignitionfiles.yml b/playbooks/manual/ocp4-place-ignitionfiles.yml index 42b02c2390..ceb1ed6a96 100644 --- a/playbooks/manual/ocp4-place-ignitionfiles.yml +++ b/playbooks/manual/ocp4-place-ignitionfiles.yml @@ -65,7 +65,7 @@ tags: - ignition - repo - when: "{%['os_control_stg', 'os_control'] | intersect(group_names) | count > 0%}" + when: inventory_hostname in groups['os_control_stg'] or inventory_hostname in groups['os_control'] - name: == OCP KVM provisioning == Downloading RHCOS deploy files get_url: @@ -91,18 +91,18 @@ register: vm_exists tags: - kvm_deploy - when: "{%['ocp_vms_stg', 'ocp_vms'] | intersect(group_names) | count > 0%}" + when: inventory_hostname in groups['ocp_vms_stg'] or inventory_hostname in groups['ocp_vms'] - block: - name: ensure the lv for the guest is made lvol: lv={{ inventory_hostname }} vg={{ volgroup }} size={{ lvm_size }} state=present delegate_to: "{{ vmhost }}" tags: - kvm_deploy - when: "{%['ocp_vms_stg', 'ocp_vms'] | intersect(group_names) | count > 0%}" + when: inventory_hostname in groups['ocp_vms_stg'] or inventory_hostname in groups['ocp_vms'] - name: == OCP KVM provisioning == Deploying the OCP Virtual Guest[s] command: "{{ virt_install_command }}" delegate_to: "{{ vmhost }}" tags: - kvm_deploy - when: "{%['ocp_vms_stg', 'ocp_vms'] | intersect(group_names) | count > 0%}" + when: inventory_hostname in groups['ocp_vms_stg'] or inventory_hostname in groups['ocp_vms'] when: vm_exists is failed