mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Update hosts.yml
This commit is contained in:
parent
27e04ebe0e
commit
c6e6f7967c
1 changed files with 19 additions and 17 deletions
|
@ -1,23 +1,25 @@
|
||||||
#TODO: Use vars instead of hardcoded values
|
#TODO: Use vars instead of hardcoded values
|
||||||
- name: Remove fqdn in /etc/hosts without LAN
|
- name: Remove FQDN with 172.18.96.1 in /etc/hosts without LAN (if iiab_lan_iface == "none" and not installing)
|
||||||
lineinfile: dest=/etc/hosts
|
lineinfile:
|
||||||
regexp='^172\.18\.96\.1'
|
dest: /etc/hosts
|
||||||
state=absent
|
regexp: '^172\.18\.96\.1'
|
||||||
|
state: absent
|
||||||
when: iiab_lan_iface == "none" and not installing
|
when: iiab_lan_iface == "none" and not installing
|
||||||
|
|
||||||
- name: Configure fqdn in /etc/hosts with LAN
|
- name: Configure FQDN with 172.18.96.1 in /etc/hosts with LAN (if iiab_lan_iface != "none" and not installing)
|
||||||
lineinfile: dest=/etc/hosts
|
lineinfile:
|
||||||
regexp='^172\.18\.96\.1'
|
dest: /etc/hosts
|
||||||
line='172.18.96.1 {{ iiab_hostname }}.{{ iiab_domain }} {{ iiab_hostname }} box'
|
regexp: '^172\.18\.96\.1'
|
||||||
state=present
|
line: '172.18.96.1 {{ iiab_hostname }}.{{ iiab_domain }} {{ iiab_hostname }} box'
|
||||||
|
state: present
|
||||||
when: iiab_lan_iface != "none" and not installing
|
when: iiab_lan_iface != "none" and not installing
|
||||||
|
|
||||||
- name: Configure fqdn in /etc/hosts appliance mode
|
- name: Configure FQDN with 127.0.0.1 in /etc/hosts appliance mode (if iiab_lan_iface == "none" and not installing)
|
||||||
lineinfile: dest=/etc/hosts
|
lineinfile:
|
||||||
regexp='^127\.0\.0\.1'
|
dest: /etc/hosts
|
||||||
line='127.0.0.1 localhost.localdomain localhost {{ iiab_hostname }}.{{ iiab_domain }} {{ iiab_hostname }} box '
|
regexp: '^127\.0\.0\.1'
|
||||||
owner=root
|
line: '127.0.0.1 localhost.localdomain localhost {{ iiab_hostname }}.{{ iiab_domain }} {{ iiab_hostname }} box '
|
||||||
group=root
|
owner: root
|
||||||
mode=0644
|
group: root
|
||||||
|
mode: 0644
|
||||||
when: iiab_lan_iface == "none" and not installing
|
when: iiab_lan_iface == "none" and not installing
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue