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
This commit is contained in:
Emilien Macchi 2020-09-25 09:43:58 -04:00
parent 38adf5661d
commit c02738aec9
3 changed files with 3 additions and 3 deletions

View File

@ -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:

View File

@ -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:

View File

@ -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: