forked from ISTI-ansible-roles/ansible-roles
Configure /etc/hosts on pure xen only.
This commit is contained in:
parent
cfb54c3123
commit
5398dfe38d
|
@ -6,5 +6,7 @@
|
|||
|
||||
- name: Add the hostname to /etc/hosts
|
||||
shell: grep -v {{ ansible_default_ipv4.address }} /etc/hosts > /etc/hosts.tmp ; echo "{{ ansible_default_ipv4.address }} {{ hostname }} {{ ansible_hostname }}" >> /etc/hosts.tmp ; /bin/mv /etc/hosts.tmp /etc/hosts
|
||||
when: hostname is defined
|
||||
when:
|
||||
- hostname is defined
|
||||
- ansible_virtualization_type == 'xen'
|
||||
tags: [ 'bootstrap', 'set_hostname' ]
|
||||
|
|
Loading…
Reference in New Issue