solar/resources/hosts_file/actions/run.yaml
Łukasz Oleś 3d6f48ffcf Fix quotes
2015-09-29 16:36:04 +02:00

12 lines
304 B
YAML

- hosts: [{{host}}]
sudo: yes
tasks:
{% for val in hosts %}
- name: Create hosts entries for {{val['name']}} => {{val['ip']}}
lineinfile:
dest: /etc/hosts
regexp: ".*{{val['name']}}$"
line: "{{val['ip']}} {{val['name']}}"
state: present
{% endfor %}