evolinux-base: add internal FQDN/hostname in /etc/hosts if needed

This commit is contained in:
Jérémy Lecour 2018-08-17 10:07:36 +02:00 committed by Jérémy Lecour
parent 46fed05fa2
commit 4461281945

View file

@ -20,7 +20,7 @@
lineinfile:
dest: /etc/hosts
regexp: '^{{ ansible_default_ipv4.address }}\s+'
line: "{{ ansible_default_ipv4.address }} {{ evolinux_fqdn }} {{ evolinux_hostname }}"
line: "{{ ansible_default_ipv4.address }} {{ [evolinux_fqdn, evolinux_internal_fqdn] | unique | join(' ') }} {{ [evolinux_hostname, evolinux_internal_hostname] | unique | join(' ') }}"
insertafter: '127.0.0.1\s+localhost.localdomain'
when: evolinux_hostname_hosts