ansible-playbooks/update-hosts.yml

14 lines
423 B
YAML
Raw Normal View History

---
- hosts: all
remote_user: root
gather_facts: no
tasks:
2016-02-29 17:24:53 -05:00
- name: update hosts
connection: local
git: repo=~git/public/hosts.git dest=generate-hosts
- name: generate hosts file
connection: local
shell: generate-hosts/generate-hosts.py < generate-hosts/hosts.in > generate-hosts/hosts
- name: copy hosts file
copy: src=generate-hosts/hosts dest=/etc/hosts backup=yes