commit c02738aec9dd55926c43bcec2944201f647a3523 Author: Emilien Macchi Date: Fri Sep 25 09:43:58 2020 -0400 Fix temp namespace tasks to work in check mode Fix the tasks that remove the temporary namespace when running in check mode. Checking that the rc variable is actually defined. Change-Id: I1f0512532f564d58343440bd0a6594da9609b65d diff --git a/deployment/neutron/neutron-dhcp-container-puppet.yaml b/deployment/neutron/neutron-dhcp-container-puppet.yaml index b59e3ec..a2beb9e 100644 --- a/deployment/neutron/neutron-dhcp-container-puppet.yaml +++ b/deployment/neutron/neutron-dhcp-container-puppet.yaml @@ -400,7 +400,7 @@ outputs: command: ip netns delete ns_temp failed_when: false when: - - ipnetns_add_result is defined + - ipnetns_add_result.rc is defined - ipnetns_add_result.rc == 0 - name: create /var/lib/neutron file: diff --git a/deployment/neutron/neutron-l3-container-puppet.yaml b/deployment/neutron/neutron-l3-container-puppet.yaml index 112f9e7..b539a0d 100644 --- a/deployment/neutron/neutron-l3-container-puppet.yaml +++ b/deployment/neutron/neutron-l3-container-puppet.yaml @@ -341,7 +341,7 @@ outputs: command: ip netns delete ns_temp failed_when: false when: - - ipnetns_add_result is defined + - ipnetns_add_result.rc is defined - ipnetns_add_result.rc == 0 - name: create /var/lib/neutron file: diff --git a/deployment/ovn/ovn-metadata-container-puppet.yaml b/deployment/ovn/ovn-metadata-container-puppet.yaml index 9b625fb..a8d62e2 100644 --- a/deployment/ovn/ovn-metadata-container-puppet.yaml +++ b/deployment/ovn/ovn-metadata-container-puppet.yaml @@ -353,7 +353,7 @@ outputs: command: ip netns delete ns_temp failed_when: false when: - - ipnetns_add_result is defined + - ipnetns_add_result.rc is defined - ipnetns_add_result.rc == 0 - name: create /var/lib/neutron file: