Notifable handlers only run when something is changed. Awesome.

This commit is contained in:
Michael DeHaan
2012-02-25 14:42:41 -05:00
parent de80166b6d
commit 79fdc1b6f4
3 changed files with 46 additions and 65 deletions

View File

@@ -6,17 +6,18 @@
- do:
- copy a file
- copy /srv/a /srv/b
notify:
- restart apache
- do:
- template from local file template.j2 to remote location /srv/file.out
- template /srv/template.j2 /srv/file.out
- do:
- update apache
- command /usr/bin/yum update apache
onchange:
notify:
- restart apache
- quack like a duck
handlers:
- do:
- restart apache
- command /sbin/service apache restart
- command /sbin/service httpd restart
- do:
- run bin false
- command /bin/false
- quack like a duck
- command /bin/true