diff --git a/common/deploy-steps-tasks.yaml b/common/deploy-steps-tasks.yaml index 2e4612e3bb..b310e199f5 100644 --- a/common/deploy-steps-tasks.yaml +++ b/common/deploy-steps-tasks.yaml @@ -45,6 +45,9 @@ delay: 3 failed_when: - (not puppet_host_outputs.finished) or (puppet_host_outputs.rc is defined and puppet_host_outputs.rc not in [0, 2]) + when: + - not (ansible_check_mode | bool) + - enable_puppet|bool tags: - host_config diff --git a/deployment/cinder/cinder-common-container-puppet.yaml b/deployment/cinder/cinder-common-container-puppet.yaml index 40bd8c60d1..f8103b58a3 100644 --- a/deployment/cinder/cinder-common-container-puppet.yaml +++ b/deployment/cinder/cinder-common-container-puppet.yaml @@ -166,6 +166,8 @@ outputs: vg: "cinder-volumes" pvs: "{{ _loopback_device.stdout }}" state: present + when: + - not (ansible_check_mode | bool) - name: cinder create service to run losetup for LVM on startup copy: dest: /etc/systemd/system/cinder-lvm-losetup.service @@ -186,6 +188,8 @@ outputs: [Install] WantedBy=local-fs-pre.target + when: + - not (ansible_check_mode | bool) - name: cinder enable the LVM losetup service systemd: name: cinder-lvm-losetup diff --git a/deployment/haproxy/haproxy-pacemaker-puppet.yaml b/deployment/haproxy/haproxy-pacemaker-puppet.yaml index a9e036ccbf..ab44ae1ae0 100644 --- a/deployment/haproxy/haproxy-pacemaker-puppet.yaml +++ b/deployment/haproxy/haproxy-pacemaker-puppet.yaml @@ -381,6 +381,8 @@ outputs: - name: set is_haproxy_bootstrap_node fact tags: common set_fact: is_haproxy_bootstrap_node={{haproxy_short_bootstrap_node_name|lower == ansible_hostname|lower}} + when: + - haproxy_short_bootstrap_node_name|default(false) - name: Mount TLS cert if needed when: - step|int == 1 diff --git a/deployment/haproxy/haproxy-public-tls-inject.yaml b/deployment/haproxy/haproxy-public-tls-inject.yaml index cfe0dba9a5..d01f2ca504 100644 --- a/deployment/haproxy/haproxy-public-tls-inject.yaml +++ b/deployment/haproxy/haproxy-public-tls-inject.yaml @@ -86,6 +86,8 @@ outputs: - name: set is_haproxy_bootstrap_node fact set_fact: is_haproxy_bootstrap_node={{haproxy_short_bootstrap_node_name | lower == ansible_hostname | lower}} + when: + - haproxy_short_bootstrap_node_name|default(false) - name: get haproxy status register: haproxy_state diff --git a/deployment/neutron/neutron-dhcp-container-puppet.yaml b/deployment/neutron/neutron-dhcp-container-puppet.yaml index 597836b030..bc6a876a64 100644 --- a/deployment/neutron/neutron-dhcp-container-puppet.yaml +++ b/deployment/neutron/neutron-dhcp-container-puppet.yaml @@ -399,7 +399,9 @@ outputs: - name: remove temp namespace command: ip netns delete ns_temp failed_when: false - when: ipnetns_add_result.rc == 0 + when: + - ipnetns_add_result is defined + - ipnetns_add_result.rc == 0 - name: create /var/lib/neutron file: path: /var/lib/neutron diff --git a/deployment/neutron/neutron-l3-container-puppet.yaml b/deployment/neutron/neutron-l3-container-puppet.yaml index 665da418b6..49bb6438c8 100644 --- a/deployment/neutron/neutron-l3-container-puppet.yaml +++ b/deployment/neutron/neutron-l3-container-puppet.yaml @@ -340,7 +340,9 @@ outputs: - name: remove temp namespace command: ip netns delete ns_temp failed_when: false - when: ipnetns_add_result.rc == 0 + when: + - ipnetns_add_result is defined + - ipnetns_add_result.rc == 0 - name: create /var/lib/neutron file: path: /var/lib/neutron diff --git a/deployment/ovn/ovn-metadata-container-puppet.yaml b/deployment/ovn/ovn-metadata-container-puppet.yaml index 7999c1cb10..9b625fbb15 100644 --- a/deployment/ovn/ovn-metadata-container-puppet.yaml +++ b/deployment/ovn/ovn-metadata-container-puppet.yaml @@ -352,7 +352,9 @@ outputs: - name: remove temp namespace command: ip netns delete ns_temp failed_when: false - when: ipnetns_add_result.rc == 0 + when: + - ipnetns_add_result is defined + - ipnetns_add_result.rc == 0 - name: create /var/lib/neutron file: path: /var/lib/neutron