1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/examples/playbook.yml

24 lines
674 B
YAML
Raw Normal View History

---
- pattern: '*'
hosts: /etc/ansible/hosts
tasks:
2012-02-27 02:54:51 +01:00
- 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
2012-02-27 02:54:51 +01:00
- name: template step
action: template src=/srv/template.j2 dest=/srv/file.out
notify:
- restart apache
2012-02-27 02:54:51 +01:00
- name: execute bin false
comment: call something that will fail just to demo failure counts and such
action: command /bin/false
- name: execute bin true
comment: this will never be executed because previous will fail
action: command /bin/true
handlers:
2012-02-27 02:54:51 +01:00
- name: restart apache
action: service name=httpd state=restarted