2017-05-27 18:09:50 +00:00
|
|
|
- name: Turn off ONBOOT for WAN on reboot if disabled
|
|
|
|
lineinfile: state=present
|
|
|
|
backrefs=yes
|
|
|
|
regexp='^ONBOOT'
|
|
|
|
line='ONBOOT="no"'
|
|
|
|
dest=/etc/sysconfig/network-scripts/ifcfg-WAN
|
2017-06-09 23:25:56 +00:00
|
|
|
when: has_WAN and iiab_wan_iface == "none"
|
2017-05-27 18:09:50 +00:00
|
|
|
|
|
|
|
#testpoint Need to ensure we have only one entry
|
|
|
|
- name: Ensure macaddress is correct
|
|
|
|
lineinfile: state=present
|
|
|
|
backrefs=yes
|
|
|
|
regexp='^HWADDR'
|
2017-06-09 23:25:56 +00:00
|
|
|
line='HWADDR="{{ hostvars[inventory_hostname]['ansible_' + iiab_wan_iface]['macaddress'] }}"'
|
2017-05-27 18:09:50 +00:00
|
|
|
dest=/etc/sysconfig/network-scripts/ifcfg-WAN
|
2017-06-09 23:25:56 +00:00
|
|
|
when: has_WAN and iiab_wan_iface != "none"
|
2017-05-27 18:09:50 +00:00
|
|
|
|
|
|
|
- name: Fix the DEVICE
|
|
|
|
lineinfile: state=present
|
|
|
|
backrefs=yes
|
|
|
|
regexp='^NAME'
|
2017-06-09 23:25:56 +00:00
|
|
|
line='NAME="iiab-WAN"'
|
2017-05-27 18:09:50 +00:00
|
|
|
dest=/etc/sysconfig/network-scripts/ifcfg-WAN
|
2017-06-09 23:25:56 +00:00
|
|
|
when: has_WAN and iiab_wan_iface != "none"
|
2017-05-27 18:09:50 +00:00
|
|
|
|
|
|
|
- name: Turn on ONBOOT for WAN on reboot if enabled
|
|
|
|
lineinfile: state=present
|
|
|
|
backrefs=yes
|
|
|
|
regexp="^ONBOOT"
|
|
|
|
line="ONBOOT=yes"
|
|
|
|
dest=/etc/sysconfig/network-scripts/ifcfg-WAN
|
2017-06-09 23:25:56 +00:00
|
|
|
when: has_WAN and iiab_wan_iface != "none"
|