2017-05-27 18:09:50 +00:00
|
|
|
#TODO: Use vars instead of hardcoded values
|
2018-10-03 18:52:04 +00:00
|
|
|
- name: Remove FQDN in /etc/hosts without LAN
|
|
|
|
lineinfile:
|
|
|
|
dest: /etc/hosts
|
|
|
|
regexp: '^172\.18\.96\.1'
|
|
|
|
state: absent
|
2017-06-09 23:25:56 +00:00
|
|
|
when: iiab_lan_iface == "none" and not installing
|
2017-05-27 18:09:50 +00:00
|
|
|
|
2018-10-03 18:52:04 +00:00
|
|
|
- name: Configure FQDN in /etc/hosts with LAN
|
|
|
|
lineinfile:
|
|
|
|
dest: /etc/hosts
|
|
|
|
regexp: '^172\.18\.96\.1'
|
|
|
|
line: '172.18.96.1 {{ iiab_hostname }}.{{ iiab_domain }} {{ iiab_hostname }} box iiab-server.lan'
|
|
|
|
state: present
|
2017-06-09 23:25:56 +00:00
|
|
|
when: iiab_lan_iface != "none" and not installing
|
2017-05-27 18:09:50 +00:00
|
|
|
|
2018-10-03 18:52:04 +00:00
|
|
|
- name: Configure FQDN in /etc/hosts appliance mode
|
|
|
|
lineinfile:
|
|
|
|
dest: /etc/hosts
|
|
|
|
regexp: '^127\.0\.0\.1'
|
|
|
|
line: '127.0.0.1 localhost.localdomain localhost {{ iiab_hostname }}.{{ iiab_domain }} {{ iiab_hostname }} box iiab-server.lan'
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
2017-06-09 23:25:56 +00:00
|
|
|
when: iiab_lan_iface == "none" and not installing
|