1
0
Fork 0

Update /etc/hosts only if hostname_update_etc_hosts is true

This commit is contained in:
Daniele Tricoli 2021-09-14 00:04:43 +02:00
parent e12f7108ac
commit 651e26f096

View file

@ -10,6 +10,8 @@
path: /etc/hosts
regexp: "^127.0.1.1\t"
line: "127.0.1.1\t{{ hostname }} {{ hostname_aliases | join(' ') }}"
when:
- hostname_update_etc_hosts
become: "{{ hostname_become }}"
become_user: "{{ hostname_become_user }}"