andersonvom

ansible_inventory_example

Jun 8th, 2017
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ; playbook
  2. - hosts: "{{ target }}"
  3.   roles:
  4.     - foo
  5.     - bar
  6.  
  7. ; inventory file
  8. [target]
  9. target01 myvar=some-value-1
  10. target02 myvar=some-value-2
  11. target03 myvar=some-value-3
  12. target04 myvar=some-value-4
  13. target05 myvar=some-value-5
  14.  
  15. [source]
  16. source01 myvar=some-value-s01 ansible_host=1.1.1.1
  17. source02 myvar=some-value-s02 ansible_host=1.1.1.2
  18. source03 myvar=some-value-s03 ansible_host=1.1.1.3
Advertisement
Add Comment
Please, Sign In to add comment