mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-27 10:40:22 -07:00
replace 'foo' with a more meaningful example + 1 other typo
This commit is contained in:
parent
37adadcc50
commit
0b94d3d3f8
1 changed files with 4 additions and 4 deletions
|
@ -171,7 +171,7 @@ change, but only if the file changes::
|
||||||
action: template src=template.j2 dest=/etc/foo.conf
|
action: template src=template.j2 dest=/etc/foo.conf
|
||||||
notify:
|
notify:
|
||||||
- restart memcached
|
- restart memcached
|
||||||
- restart foo
|
- restart apache
|
||||||
|
|
||||||
Next up, we'll show what a handler looks like.
|
Next up, we'll show what a handler looks like.
|
||||||
|
|
||||||
|
@ -190,10 +190,10 @@ of the tasks complete in a particular play.
|
||||||
Here's an example handlers section::
|
Here's an example handlers section::
|
||||||
|
|
||||||
handlers:
|
handlers:
|
||||||
- name: restart apache
|
|
||||||
action: service name=apache state=restarted
|
|
||||||
- name: restart memcached
|
- name: restart memcached
|
||||||
action: service name=memcached state=restarted
|
action: service name=memcached state=restarted
|
||||||
|
- name: restart apache
|
||||||
|
action: service name=apache state=restarted
|
||||||
|
|
||||||
Handlers are best used to restart services and trigger reboots. You probably
|
Handlers are best used to restart services and trigger reboots. You probably
|
||||||
won't need them for much else.
|
won't need them for much else.
|
||||||
|
@ -361,7 +361,7 @@ Alternatively, if you do not need to wait on the task to complete, you may
|
||||||
- hosts: all
|
- hosts: all
|
||||||
user: root
|
user: root
|
||||||
tasks:
|
tasks:
|
||||||
- name: simulate long running op (15 sec), wait for up to 45, poll every 5
|
- name: simulate long running op, allow to run for 45, fire and forget
|
||||||
action: command /bin/sleep 15
|
action: command /bin/sleep 15
|
||||||
async: 45
|
async: 45
|
||||||
poll: 0
|
poll: 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue