mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Update edit_ifcfg.yml
This commit is contained in:
parent
30c4f2a868
commit
aa1c8287d5
1 changed files with 30 additions and 24 deletions
|
@ -1,43 +1,49 @@
|
||||||
- name: Turn off ISP nameservers
|
- name: Turn off ISP nameservers
|
||||||
lineinfile: state=present
|
lineinfile:
|
||||||
backrefs=yes
|
state: present
|
||||||
regexp='^PEERDNS'
|
backrefs: yes
|
||||||
line='PEERDNS="no"'
|
regexp: '^PEERDNS'
|
||||||
dest={{ has_ifcfg_gw }}
|
line: 'PEERDNS="no"'
|
||||||
|
dest: "{{ has_ifcfg_gw }}"
|
||||||
|
|
||||||
- name: Turn on local nameserver
|
- name: Turn on local nameserver
|
||||||
lineinfile: state=present
|
lineinfile:
|
||||||
line='DNS1="127.0.0.1"'
|
state: present
|
||||||
dest={{ has_ifcfg_gw }}
|
line: 'DNS1="127.0.0.1"'
|
||||||
|
dest: "{{ has_ifcfg_gw }}"
|
||||||
|
|
||||||
- name: Remove the UUID
|
- name: Remove the UUID
|
||||||
lineinfile: state=absent
|
lineinfile:
|
||||||
regexp='^UUID'
|
state: absent
|
||||||
dest={{ has_ifcfg_gw }}
|
regexp: '^UUID'
|
||||||
|
dest: "{{ has_ifcfg_gw }}"
|
||||||
|
|
||||||
# Leave wifi as is NAME=<AP> needs to match keyring name.
|
# Leave wifi as is NAME=<AP> needs to match keyring name.
|
||||||
- name: Fix the NM name
|
- name: Fix the NM name
|
||||||
lineinfile: state=present
|
lineinfile:
|
||||||
backrefs=yes
|
state: present
|
||||||
regexp='^NAME'
|
backrefs: yes
|
||||||
line='NAME="iiab-WAN"'
|
regexp: '^NAME'
|
||||||
dest={{ has_ifcfg_gw }}
|
line: 'NAME="iiab-WAN"'
|
||||||
|
dest: "{{ has_ifcfg_gw }}"
|
||||||
when: has_wifi_gw == "none"
|
when: has_wifi_gw == "none"
|
||||||
|
|
||||||
# testpoint - quoting and present
|
# testpoint - quoting and present
|
||||||
# note DEVICE can change what is displayed via "ip and friends"
|
# note DEVICE can change what is displayed via "ip and friends"
|
||||||
- name: Fix the DEVICE
|
- name: Fix the DEVICE
|
||||||
lineinfile: state=present
|
lineinfile:
|
||||||
backrefs=yes
|
state: present
|
||||||
regexp='^DEVICE'
|
backrefs: yes
|
||||||
line='DEVICE="{{ iiab_wan_iface }}"'
|
regexp: '^DEVICE'
|
||||||
dest={{ has_ifcfg_gw }}
|
line: 'DEVICE="{{ iiab_wan_iface }}"'
|
||||||
|
dest: "{{ has_ifcfg_gw }}"
|
||||||
when: iiab_wan_iface != "none" and has_wifi_gw == "none"
|
when: iiab_wan_iface != "none" and has_wifi_gw == "none"
|
||||||
|
|
||||||
- name: Add marker
|
- name: Add marker
|
||||||
lineinfile: state=present
|
lineinfile:
|
||||||
line="# Modified by IIAB"
|
state: present
|
||||||
dest={{ has_ifcfg_gw }}
|
line: "# Modified by IIAB"
|
||||||
|
dest: "{{ has_ifcfg_gw }}"
|
||||||
|
|
||||||
- name: Rename supplied gateway ifcfg file to WAN if present
|
- name: Rename supplied gateway ifcfg file to WAN if present
|
||||||
shell: mv "{{ has_ifcfg_gw }}" /etc/sysconfig/network-scripts/ifcfg-WAN
|
shell: mv "{{ has_ifcfg_gw }}" /etc/sysconfig/network-scripts/ifcfg-WAN
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue