1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 03:32:12 +00:00

Update enable_wan.yml

This commit is contained in:
A Holt 2018-10-08 18:55:09 -04:00 committed by GitHub
parent c6e6f7967c
commit 30c4f2a868
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,32 +1,36 @@
- 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
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"
#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_' + iiab_wan_iface]['macaddress'] }}"'
dest=/etc/sysconfig/network-scripts/ifcfg-WAN
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"
- name: Fix the DEVICE
lineinfile: state=present
backrefs=yes
regexp='^NAME'
line='NAME="iiab-WAN"'
dest=/etc/sysconfig/network-scripts/ifcfg-WAN
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"
- 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
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"