mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-07-01 16:18:55 +00:00
Notifable handlers only run when something is changed. Awesome.
This commit is contained in:
parent
de80166b6d
commit
79fdc1b6f4
3 changed files with 46 additions and 65 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue