mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
6cceaa5f6a
onchange events like Puppet's file providers do.
28 lines
582 B
YAML
28 lines
582 B
YAML
- pattern: '*'
|
|
tasks:
|
|
- do:
|
|
- copy a file
|
|
- copy
|
|
- [ "/srv/a", "/srv/b" ]
|
|
- do:
|
|
- configure template & module variables
|
|
- setup
|
|
- [ "a=2", "b=3", "c=4" ]
|
|
- 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:
|
|
- do:
|
|
- restart apache
|
|
- command
|
|
- [/sbin/service, apache, restart]
|
|
- do:
|
|
- run bin false
|
|
- command
|
|
- [/bin/false]
|
|
|