evolinux-base: fqdn replacement in /etc/hosts

If the FQDN changes, it is changed in /etc/hosts instead and not added
This commit is contained in:
Jérémy Lecour 2016-12-27 16:45:46 +01:00 committed by Jérémy Lecour
parent b2c6847019
commit 6517a234d6

View file

@ -12,6 +12,7 @@
- name: Set ip+fqdn+hostname in /etc/hosts
lineinfile:
dest: /etc/hosts
regexp: '^{{ ansible_default_ipv4.address }}\s+'
line: "{{ ansible_default_ipv4.address }} {{ evolinux_fqdn }} {{ evolinux_hostname }}"
insertafter: '127.0.0.1\s+localhost.localdomain'