commit d49703239499ef8c952c1738b35fd08f35ff92cf
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Thu Nov 24 14:47:54 2016 +0100
Update copy ifcfg files
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 9f851e9..c32728b 100644
--- a/roles/base/tasks/main.yml
+++ b/roles/base/tasks/main.yml
@@ -57,14 +57,14 @@
- base
- name: copy ifcfg files - non virthost
- template: src=ifcfg.j2 dest=/etc/sysconfig/network-scripts/ifcfg-{{item}} mode=644
+ template: src=ifcfg.j2 dest=/etc/sysconfig/network-scripts/ifcfg-{{item}} mode=0644
with_items:
- "{{ ansible_interfaces }}"
notify:
-# - restart NetworkManager
+# - restart NetworkManager
- reload NetworkManager-connections
- apply interface-changes
- when: (virthost is not defined) and (not item.startswith('tun')) and (not
item.startswith('virbr')) and (not item.startswith('vnet')) 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'))) 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 )
tags:
- config
- ifcfg