summaryrefslogtreecommitdiff
path: root/examples/playbooks
diff options
context:
space:
mode:
authorMichael DeHaan <michael@ansibleworks.com>2013-04-20 16:19:01 -0400
committerMichael DeHaan <michael@ansibleworks.com>2013-04-20 16:19:01 -0400
commit37789a852a84969820dea9875cfbc176b24f4d55 (patch)
tree2292b898d4aa7b64d1324d206fc14a3d59f6dde4 /examples/playbooks
parentd7623d1f91326f09e4c488b117bb14378a035144 (diff)
downloadansible-37789a852a84969820dea9875cfbc176b24f4d55.tar.gz
Rename set_up and tear_down to pre_tasks and post_tasks
Diffstat (limited to 'examples/playbooks')
-rw-r--r--examples/playbooks/roletest.yml17
1 files changed, 10 insertions, 7 deletions
diff --git a/examples/playbooks/roletest.yml b/examples/playbooks/roletest.yml
index 5370c004eb..d973565cb4 100644
--- a/examples/playbooks/roletest.yml
+++ b/examples/playbooks/roletest.yml
@@ -26,10 +26,12 @@
- hosts: all
- set_up:
+ pre_tasks:
- # set up tasks are executed prior to roles.
- - local_action: shell echo "hi this is a setup step about {{ inventory_hostname }}"
+ # these tasks are executed prior to roles.
+ # this might be a good time to signal an outage window or take a host out of a load balanced pool
+
+ - local_action: shell echo "hi this is a pre_task step about {{ inventory_hostname }}"
roles:
@@ -53,15 +55,16 @@
tasks:
- # you can still have loose tasks/handlers and they will execute after roles
+ # you can still have loose tasks/handlers and they will execute after roles are applied
- shell: echo 'this is a loose task'
- tear_down:
+ post_tasks:
- # just to provide a syntactic mirroring to 'set_up', tear_down runs dead last in the play.
+ # just to provide a syntactic mirroring to 'pre_tasks', these run absolute last in the play.
+ # this might be a good time to put a host back in a load balanced pool or end an outage window
- - local_action: shell echo 'this is a teardown task about {{ inventory_hostname }}'
+ - local_action: shell echo 'this is a post_task about {{ inventory_hostname }}'