1
0
Fork 0
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:
Jerry Vonau 2017-11-05 13:40:19 -06:00
parent 35cd2b44a5
commit a32f81922e
2 changed files with 8 additions and 8 deletions

View file

@ -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

View file

@ -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'