ansible/examples/playbook.yml
Michael DeHaan ba4e36a9a9 Rename 'ensure' to 'state' because I think it's a bit cleaner and doesn't imply
all modules take a common parameter name.  But more or less we still work idempotently
in modules.
2012-02-26 22:31:42 -05:00

20 lines
549 B
YAML

---
- pattern: '*'
hosts: /etc/ansible/hosts
tasks:
- name: config step
action: setup a=2 b=3 c=4
- name: copy comand
action: copy src=/srv/a dest=/srv/b
notify:
- restart apache
- name: template step
action: template src=/srv/template.j2 dest=/srv/file.out
notify:
- restart apache
- name: execute bin false
comment: call something that will fail just to demo failure counts and such
action: command /bin/false
handlers:
- name: restart apache
action: service name=httpd state=restarted