2012-02-24 06:02:24 +00:00
|
|
|
- pattern: '*'
|
2012-02-27 00:55:26 +00:00
|
|
|
hosts: /etc/ansible/hosts
|
2012-02-24 04:54:16 +00:00
|
|
|
tasks:
|
2012-02-24 08:25:09 +00:00
|
|
|
- do:
|
2012-02-27 00:21:44 +00:00
|
|
|
- configure template & module variables for future template calls
|
2012-02-05 18:05:09 +00:00
|
|
|
- setup a=2 b=3 c=4
|
2012-02-05 17:52:07 +00:00
|
|
|
- do:
|
2012-02-27 00:21:44 +00:00
|
|
|
- copy a file from the local disk to the remote
|
|
|
|
- copy src=/srv/a dest=/srv/b
|
2012-02-25 19:42:41 +00:00
|
|
|
notify:
|
|
|
|
- restart apache
|
2012-02-24 08:45:36 +00:00
|
|
|
- do:
|
|
|
|
- template from local file template.j2 to remote location /srv/file.out
|
2012-02-27 00:21:44 +00:00
|
|
|
- template src=/srv/template.j2 dest=/srv/file.out
|
2012-02-25 19:42:41 +00:00
|
|
|
notify:
|
|
|
|
- restart apache
|
|
|
|
- quack like a duck
|
2012-02-25 20:21:11 +00:00
|
|
|
- do:
|
2012-02-27 00:21:44 +00:00
|
|
|
- if running as non-root whne you template, you should specify the MD file (1)
|
|
|
|
- setup a=3 b=4 c=5 metadata=/tmp/metadata.json
|
|
|
|
- do:
|
|
|
|
- if running as non-root when you template, you should specify the MD file (2)
|
|
|
|
- template src=/srv/template.j2 dest=/srv/file2.out metadata=/tmp/metadata.json
|
|
|
|
- do:
|
|
|
|
- call something that will fail just to demo failure counts and such
|
2012-02-25 20:21:11 +00:00
|
|
|
- command /bin/false
|
2012-02-25 19:42:41 +00:00
|
|
|
handlers:
|
2012-02-24 04:54:16 +00:00
|
|
|
- do:
|
2012-02-24 06:02:24 +00:00
|
|
|
- restart apache
|
2012-02-26 01:27:11 +00:00
|
|
|
- service name=httpd ensure=restarted
|
2012-02-24 04:54:16 +00:00
|
|
|
- do:
|
2012-02-25 19:42:41 +00:00
|
|
|
- quack like a duck
|
|
|
|
- command /bin/true
|