mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
set hostname alias early
This commit is contained in:
parent
35cd2b44a5
commit
a32f81922e
2 changed files with 8 additions and 8 deletions
|
@ -9,3 +9,11 @@
|
|||
group=root
|
||||
mode=0644
|
||||
when: is_redhat
|
||||
|
||||
- name: Configure short hostname in /etc/hosts
|
||||
lineinfile: dest=/etc/hosts
|
||||
regexp='^127\.0\.0\.1'
|
||||
line='127.0.0.1 localhost.localdomain localhost box {{ iiab_hostname }}'
|
||||
owner=root
|
||||
group=root
|
||||
mode=0644
|
||||
|
|
|
@ -1,12 +1,4 @@
|
|||
#TODO: Use vars instead of hardcoded values
|
||||
- name: Configure short hostname in /etc/hosts
|
||||
lineinfile: dest=/etc/hosts
|
||||
regexp='^127\.0\.0\.1'
|
||||
line='127.0.0.1 localhost.localdomain localhost box {{ iiab_hostname }}'
|
||||
owner=root
|
||||
group=root
|
||||
mode=0644
|
||||
|
||||
- name: Remove fqdn in /etc/hosts without LAN
|
||||
lineinfile: dest=/etc/hosts
|
||||
regexp='^172\.18\.96\.1'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue