Fix the hostname definition in /etc/hosts.
This commit is contained in:
parent
91c4b509ec
commit
1baa07ca3e
|
|
@ -19,5 +19,5 @@
|
|||
marker_begin: ansible_hostname_start
|
||||
marker_end: ansible_hostname_end
|
||||
marker: "# {mark} hostname entry managed by ansible"
|
||||
block: "{{ ansible_default_ipv4.address }} {{ hostname | default(ansible_hostname) }} {{ ansible_hostname }} {{ ansible_fqdn }}"
|
||||
block: "{{ ansible_default_ipv4.address }} {% if hostname is defined {{ hostname }}{% else %}{{ ansible_fqdn }} {{ ansible_hostname) }}{% endif %}"
|
||||
state: present
|
||||
|
|
|
|||
Loading…
Reference in New Issue