mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-22 12:03:58 -07:00
Can it get an easier? Yes it can! Further simply playbook format.
This commit is contained in:
parent
6d0fd2bfde
commit
ba9468266f
2 changed files with 10 additions and 7 deletions
|
@ -2,21 +2,21 @@
|
|||
tasks:
|
||||
- do:
|
||||
- configure template & module variables
|
||||
- [ setup, [ "a=2", "b=3", "c=4" ] ]
|
||||
- setup a=2 b=3 c=4
|
||||
- do:
|
||||
- copy a file
|
||||
- [ copy, [ "/srv/a", "/srv/b" ] ]
|
||||
- copy /srv/a /srv/b
|
||||
- do:
|
||||
- template from local file template.j2 to remote location /srv/file.out
|
||||
- [ template, [ '/srv/template.j2', '/srv/file.out' ] ]
|
||||
- template /srv/template.j2 /srv/file.out
|
||||
- do:
|
||||
- update apache
|
||||
- [ command, [/usr/bin/yum, update, apache] ]
|
||||
- command /usr/bin/yum update apache
|
||||
onchange:
|
||||
- do:
|
||||
- restart apache
|
||||
- [ command, [/sbin/service, apache, restart] ]
|
||||
- command /sbin/service apache restart
|
||||
- do:
|
||||
- run bin false
|
||||
- [ command, [/bin/false] ]
|
||||
- command /bin/false
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue