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/edit_ifcfg.yml
georgejhunt f319afa432 Test (#20)
* change apache_data to apache_user in all

* no libapach2 in centos. just php. no php-magick in centos

* remove redundant vars entries

* do not create apache user

* missed one pound sign

* soft code all references to apache_user

* centos requires older setuptools

* revert ansible_lsb.id in xsce.yml

* try getting recent pip

* move pip download to 2prep so that kalite success is not dependent on iiab coming first

* still need to replace setuptools in kalite

* add curl -- needed in debian

* massivly substitue iiab for xsce, and rename files

* completed runansible

* centos fixes,install  pip

* appliance means no iptables rules

* change to earlier version of setuptools for centos

* delete file duplicate, hopefully unnecessary. generate the offline docs

* wiki docs errors

* create the admin group -- deleted earlier

* use the --yes option with pip uninstall

* base of repo moved from schoolserver to iiab, unleashkids.org->iiab.io

* network detection broken due to tupo
2017-06-09 16:25:56 -07:00

49 lines
1.4 KiB
YAML

- name: Turn off isp nameservers
lineinfile: state=present
backrefs=yes
regexp='^PEERDNS'
line='PEERDNS="no"'
dest={{ has_ifcfg_gw }}
- name: Turn on local nameserver
lineinfile: state=present
line='DNS1="127.0.0.1"'
dest={{ has_ifcfg_gw }}
- name: Remove the UUID
lineinfile: state=absent
regexp='^UUID'
dest={{ has_ifcfg_gw }}
# Leave wifi as is NAME=<AP> needs to match keyring name.
- name: Fix the NM name
lineinfile: state=present
backrefs=yes
regexp='^NAME'
line='NAME="iiab-WAN"'
dest={{ has_ifcfg_gw }}
when: has_wifi_gw == "none"
# testpoint - quoting and present
# note DEVICE can change what is displayed via "ip and friends"
- name: Fix the DEVICE
lineinfile: state=present
backrefs=yes
regexp='^DEVICE'
line='DEVICE="{{ iiab_wan_iface }}"'
dest={{ has_ifcfg_gw }}
when: iiab_wan_iface != "none" and has_wifi_gw == "none"
- name: add marker
lineinfile: state=present
line="# Modified by XSCE"
dest={{ has_ifcfg_gw }}
- name: Rename supplied gateway ifcfg file to WAN if present
shell: mv "{{ has_ifcfg_gw }}" /etc/sysconfig/network-scripts/ifcfg-WAN
when: has_wifi_gw == "none"
- name: Now setting ifcfg-WAN True after moving file
set_fact:
has_WAN: True
when: has_wifi_gw == "none"