ali_khawaja

ansible: passing variable to include_tasks

Jun 10th, 2018
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. file1.yml
  2. ------------------
  3. - include_tasks: file2.yml
  4. var:
  5. mode: "sp"
  6.  
  7. file2.yml
  8. ------------------
  9. - do_something
  10. when: mode = "sp"
  11.  
  12.  
  13. -----------------
  14. results in error saying mode is undefined in the when statement
Advertisement
Add Comment
Please, Sign In to add comment