8d57ceecf1
as well as template files. PLUS, variables are now expressed in playbooks without having to know about the setup task, which means playbooks are simpler to read now.
24 lines
627 B
YAML
24 lines
627 B
YAML
---
|
|
- hosts: '*'
|
|
vars:
|
|
a: 2
|
|
b: 3
|
|
c: 4
|
|
tasks:
|
|
- 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
|
|
- name: execute bin true
|
|
comment: this will never be executed because previous will fail
|
|
action: command /bin/true
|
|
handlers:
|
|
- name: restart apache
|
|
action: service name=httpd state=restarted
|