mirror of
https://github.com/iiab/iiab.git
synced 2025-02-15 04:32:11 +00:00
Merge pull request #1847 from jvonau/hosts
Make ansible happy [so box.lan resolves on Debian 10 Buster]
This commit is contained in:
commit
845f507958
2 changed files with 6 additions and 4 deletions
|
@ -24,11 +24,12 @@
|
|||
mode: 0644
|
||||
when: is_redhat | bool
|
||||
|
||||
- name: Put hostnames "127.0.0.1 localhost.localdomain localhost box {{ iiab_hostname }}" in /etc/hosts
|
||||
# roles/network/tasks/hosts.yml ALSO does this:
|
||||
- name: 'Put FQDN & hostnames in /etc/hosts: "127.0.0.1 {{ iiab_hostname }}.{{ iiab_domain }} localhost.localdomain localhost {{ iiab_hostname }} box box.lan"'
|
||||
lineinfile:
|
||||
path: /etc/hosts
|
||||
regexp: '^127\.0\.0\.1'
|
||||
line: '127.0.0.1 localhost.localdomain localhost box {{ iiab_hostname }}'
|
||||
line: '127.0.0.1 {{ iiab_hostname }}.{{ iiab_domain }} localhost.localdomain localhost {{ iiab_hostname }} box box.lan'
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
|
|
|
@ -14,11 +14,12 @@
|
|||
state: present
|
||||
when: iiab_lan_iface != "none" and not installing
|
||||
|
||||
- name: Configure FQDN with 127.0.0.1 in /etc/hosts appliance mode (if iiab_lan_iface == "none" and not installing)
|
||||
# roles/0-init/tasks/hostname.yml ALSO does this:
|
||||
- name: 'Put FQDN & hostnames in /etc/hosts: "127.0.0.1 {{ iiab_hostname }}.{{ iiab_domain }} localhost.localdomain localhost {{ iiab_hostname }} box box.lan" (if iiab_lan_iface == "none" and not installing, appliance mode?)'
|
||||
lineinfile:
|
||||
path: /etc/hosts
|
||||
regexp: '^127\.0\.0\.1'
|
||||
line: '127.0.0.1 localhost.localdomain localhost {{ iiab_hostname }}.{{ iiab_domain }} {{ iiab_hostname }} box box.lan'
|
||||
line: '127.0.0.1 {{ iiab_hostname }}.{{ iiab_domain }} localhost.localdomain localhost {{ iiab_hostname }} box box.lan'
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
|
|
Loading…
Reference in a new issue