mirror of
https://github.com/iiab/iiab.git
synced 2025-02-15 04:32:11 +00:00
32 lines
1.2 KiB
YAML
32 lines
1.2 KiB
YAML
- 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
|
|
when: has_WAN and xsce_wan_iface == "none"
|
|
|
|
#testpoint Need to ensure we have only one entry
|
|
- name: Ensure macaddress is correct
|
|
lineinfile: state=present
|
|
backrefs=yes
|
|
regexp='^HWADDR'
|
|
line='HWADDR="{{ hostvars[inventory_hostname]['ansible_' + xsce_wan_iface]['macaddress'] }}"'
|
|
dest=/etc/sysconfig/network-scripts/ifcfg-WAN
|
|
when: has_WAN and xsce_wan_iface != "none"
|
|
|
|
- name: Fix the DEVICE
|
|
lineinfile: state=present
|
|
backrefs=yes
|
|
regexp='^NAME'
|
|
line='NAME="xsce-WAN"'
|
|
dest=/etc/sysconfig/network-scripts/ifcfg-WAN
|
|
when: has_WAN and xsce_wan_iface != "none"
|
|
|
|
- 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
|
|
when: has_WAN and xsce_wan_iface != "none"
|