apend hosts
This commit is contained in:
10
haproxy.yml
10
haproxy.yml
@@ -33,4 +33,12 @@
|
|||||||
service:
|
service:
|
||||||
name: haproxy
|
name: haproxy
|
||||||
enabled: true
|
enabled: true
|
||||||
state: started
|
state: started
|
||||||
|
- name: append hosts to etc_hosts
|
||||||
|
blockinfile:
|
||||||
|
state: present
|
||||||
|
dest: /etc/hosts
|
||||||
|
content: |
|
||||||
|
{% for host in groups.all %}
|
||||||
|
{{ host }} {{ hostvars\[host\]\['hostname'\] }}
|
||||||
|
{% endfor %}
|
||||||
Reference in New Issue
Block a user