1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 11:42:08 +00:00
iiab/roles/network/tasks/fedora/enable_wan.yml

37 lines
1 KiB
YAML
Raw Normal View History

2017-05-27 18:09:50 +00:00
- name: Turn off ONBOOT for WAN on reboot if disabled
2018-10-08 22:55:09 +00:00
lineinfile:
state: present
backrefs: yes
regexp: '^ONBOOT'
line: 'ONBOOT="no"'
dest: /etc/sysconfig/network-scripts/ifcfg-WAN
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
2018-10-08 22:55:09 +00:00
lineinfile:
state: present
backrefs: yes
regexp: '^HWADDR'
line: 'HWADDR="{{ hostvars[inventory_hostname]['ansible_' + iiab_wan_iface]['macaddress'] }}"'
dest: /etc/sysconfig/network-scripts/ifcfg-WAN
when: has_WAN and iiab_wan_iface != "none"
2017-05-27 18:09:50 +00:00
- name: Fix the DEVICE
2018-10-08 22:55:09 +00:00
lineinfile:
state: present
backrefs: yes
regexp: '^NAME'
line: 'NAME="iiab-WAN"'
dest: /etc/sysconfig/network-scripts/ifcfg-WAN
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
2018-10-08 22:55:09 +00:00
lineinfile:
state: present
backrefs: yes
regexp: "^ONBOOT"
line: "ONBOOT=yes"
dest: /etc/sysconfig/network-scripts/ifcfg-WAN
when: has_WAN and iiab_wan_iface != "none"