Advertisement
Guest User

Untitled

a guest
Sep 5th, 2012
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.71 KB | None | 0 0
  1. # Given input files playbook.yaml and foo.yaml:
  2.  
  3. # playbook.yaml
  4. ---
  5. # ...
  6. - tasks:
  7.   - include: tasks/foo.yaml tags=foo dir=/var/foo
  8.     tags: frob
  9.  
  10. # foo.yaml
  11. ---
  12. - action: command rm -fr $dir
  13.   tags: [foo, ansible, rocks]
  14. - action: command mkdir -p $dir
  15.   tags: [bar, ansible, rocks]
  16.  
  17. # It would become:
  18.  
  19. # playbook.yaml
  20. ---
  21. # ...
  22. - tasks:
  23.   - action: command rm -fr /var/foo
  24.       tags: [frob, ansible, rocks, foo]
  25.  
  26. # $dir was substituted with the args_spec in the initial include
  27. # statement and became /var/foo
  28.  
  29. # 'frob' comes from the initial tagging applied to the include statement
  30.  
  31. # 'foo', 'ansible', and 'rocks' come from the tagging applied to the
  32. # action definition in foo.yaml
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement