1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 19:52:06 +00:00
iiab/roles/network/tasks/hosts.yml

26 lines
1 KiB
YAML
Raw Normal View History

2017-05-27 18:09:50 +00:00
#TODO: Use vars instead of hardcoded values
2018-10-08 22:49:04 +00:00
- name: Remove FQDN with 172.18.96.1 in /etc/hosts without LAN (if iiab_lan_iface == "none" and not installing)
lineinfile:
2018-10-03 22:20:00 +00:00
path: /etc/hosts
2018-10-08 22:49:04 +00:00
regexp: '^172\.18\.96\.1'
state: absent
when: iiab_lan_iface == "none" and not installing
2017-05-27 18:09:50 +00:00
2018-10-08 22:49:04 +00:00
- name: Configure FQDN with 172.18.96.1 in /etc/hosts with LAN (if iiab_lan_iface != "none" and not installing)
lineinfile:
2018-10-03 22:20:00 +00:00
path: /etc/hosts
2018-10-08 22:49:04 +00:00
regexp: '^172\.18\.96\.1'
2019-01-25 16:46:30 +00:00
line: '172.18.96.1 {{ iiab_hostname }}.{{ iiab_domain }} {{ iiab_hostname }} box box.lan pbx pbx.lan'
2018-10-08 22:49:04 +00:00
state: present
when: iiab_lan_iface != "none" and not installing
2017-05-27 18:09:50 +00:00
2018-10-08 22:49:04 +00:00
- name: Configure FQDN with 127.0.0.1 in /etc/hosts appliance mode (if iiab_lan_iface == "none" and not installing)
lineinfile:
2018-10-03 22:20:00 +00:00
path: /etc/hosts
2018-10-08 22:49:04 +00:00
regexp: '^127\.0\.0\.1'
2019-01-11 00:12:56 +00:00
line: '127.0.0.1 localhost.localdomain localhost {{ iiab_hostname }}.{{ iiab_domain }} {{ iiab_hostname }} box box.lan'
2018-10-08 22:49:04 +00:00
owner: root
group: root
mode: 0644
when: iiab_lan_iface == "none" and not installing