Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Given input files playbook.yaml and foo.yaml:
- # playbook.yaml
- ---
- # ...
- - tasks:
- - include: tasks/foo.yaml tags=foo dir=/var/foo
- tags: frob
- # foo.yaml
- ---
- - action: command rm -fr $dir
- tags: [foo, ansible, rocks]
- - action: command mkdir -p $dir
- tags: [bar, ansible, rocks]
- # It would become:
- # playbook.yaml
- ---
- # ...
- - tasks:
- - action: command rm -fr /var/foo
- tags: [frob, ansible, rocks, foo]
- # $dir was substituted with the args_spec in the initial include
- # statement and became /var/foo
- # 'frob' comes from the initial tagging applied to the include statement
- # 'foo', 'ansible', and 'rocks' come from the tagging applied to the
- # action definition in foo.yaml
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement