mirror of
https://github.com/iiab/iiab.git
synced 2025-02-15 04:32:11 +00:00
Update enable_wan.yml
This commit is contained in:
parent
c6e6f7967c
commit
30c4f2a868
1 changed files with 24 additions and 20 deletions
|
@ -1,32 +1,36 @@
|
||||||
- name: Turn off ONBOOT for WAN on reboot if disabled
|
- name: Turn off ONBOOT for WAN on reboot if disabled
|
||||||
lineinfile: state=present
|
lineinfile:
|
||||||
backrefs=yes
|
state: present
|
||||||
regexp='^ONBOOT'
|
backrefs: yes
|
||||||
line='ONBOOT="no"'
|
regexp: '^ONBOOT'
|
||||||
dest=/etc/sysconfig/network-scripts/ifcfg-WAN
|
line: 'ONBOOT="no"'
|
||||||
|
dest: /etc/sysconfig/network-scripts/ifcfg-WAN
|
||||||
when: has_WAN and iiab_wan_iface == "none"
|
when: has_WAN and iiab_wan_iface == "none"
|
||||||
|
|
||||||
#testpoint Need to ensure we have only one entry
|
#testpoint Need to ensure we have only one entry
|
||||||
- name: Ensure macaddress is correct
|
- name: Ensure macaddress is correct
|
||||||
lineinfile: state=present
|
lineinfile:
|
||||||
backrefs=yes
|
state: present
|
||||||
regexp='^HWADDR'
|
backrefs: yes
|
||||||
line='HWADDR="{{ hostvars[inventory_hostname]['ansible_' + iiab_wan_iface]['macaddress'] }}"'
|
regexp: '^HWADDR'
|
||||||
dest=/etc/sysconfig/network-scripts/ifcfg-WAN
|
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"
|
when: has_WAN and iiab_wan_iface != "none"
|
||||||
|
|
||||||
- name: Fix the DEVICE
|
- name: Fix the DEVICE
|
||||||
lineinfile: state=present
|
lineinfile:
|
||||||
backrefs=yes
|
state: present
|
||||||
regexp='^NAME'
|
backrefs: yes
|
||||||
line='NAME="iiab-WAN"'
|
regexp: '^NAME'
|
||||||
dest=/etc/sysconfig/network-scripts/ifcfg-WAN
|
line: 'NAME="iiab-WAN"'
|
||||||
|
dest: /etc/sysconfig/network-scripts/ifcfg-WAN
|
||||||
when: has_WAN and iiab_wan_iface != "none"
|
when: has_WAN and iiab_wan_iface != "none"
|
||||||
|
|
||||||
- name: Turn on ONBOOT for WAN on reboot if enabled
|
- name: Turn on ONBOOT for WAN on reboot if enabled
|
||||||
lineinfile: state=present
|
lineinfile:
|
||||||
backrefs=yes
|
state: present
|
||||||
regexp="^ONBOOT"
|
backrefs: yes
|
||||||
line="ONBOOT=yes"
|
regexp: "^ONBOOT"
|
||||||
dest=/etc/sysconfig/network-scripts/ifcfg-WAN
|
line: "ONBOOT=yes"
|
||||||
|
dest: /etc/sysconfig/network-scripts/ifcfg-WAN
|
||||||
when: has_WAN and iiab_wan_iface != "none"
|
when: has_WAN and iiab_wan_iface != "none"
|
||||||
|
|
Loading…
Reference in a new issue