commit 63a372690a3057e173465a106f0e52ba3aa3db47
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Mon Feb 5 19:01:43 2018 +0100
Fix nmclitest
roles/base/tasks/main.yml | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/roles/base/tasks/main.yml b/roles/base/tasks/main.yml
index 5ed59ef..a44f9b7 100644
--- a/roles/base/tasks/main.yml
+++ b/roles/base/tasks/main.yml
@@ -54,7 +54,7 @@
ini_file: dest=/etc/NetworkManager/NetworkManager.conf section=main option=dns
value=none
notify:
- restart NetworkManager
- when: ansible_distribution_major_version|int >=7 and nmclitest|success and ( not
ansible_ifcfg_blacklist) and not nm_controlled_resolv
+ when: ansible_distribution_major_version|int >=7 and nmclitest.rc == 0 and ( not
ansible_ifcfg_blacklist) and not nm_controlled_resolv
tags:
- config
- resolvconf
@@ -67,7 +67,7 @@
changed_when: false
failed_when: 'if_uuid.stdout == ""'
check_mode: no
- when: ansible_distribution_major_version|int >=7 and nmclitest|success and ( not
ansible_ifcfg_blacklist )
+ when: ansible_distribution_major_version|int >=7 and nmclitest.rc == 0 and ( not
ansible_ifcfg_blacklist )
tags:
- config
- ifcfg
@@ -81,7 +81,7 @@
# - restart NetworkManager
- reload NetworkManager-connections
- apply interface-changes
- when: (virthost is not defined) and
(item.startswith(('eth','br','enc'))) and
(hostvars[inventory_hostname]['ansible_' +
item.replace('-','_')]['type'] == 'ether') and
(ansible_distribution_major_version|int >=7) and
hostvars[inventory_hostname]['ansible_' +
item.replace('-','_')]['active'] and nmclitest|success and ( not
ansible_ifcfg_blacklist ) and ( ansible_ifcfg_whitelist is not defined or item in
ansible_ifcfg_whitelist )
+ when: (virthost is not defined) and
(item.startswith(('eth','br','enc'))) and
(hostvars[inventory_hostname]['ansible_' +
item.replace('-','_')]['type'] == 'ether') and
(ansible_distribution_major_version|int >=7) and
hostvars[inventory_hostname]['ansible_' +
item.replace('-','_')]['active'] and nmclitest.rc == 0 and ( not
ansible_ifcfg_blacklist ) and ( ansible_ifcfg_whitelist is not defined or item in
ansible_ifcfg_whitelist )
tags:
- config
- ifcfg
Show replies by date