Advertisement
Guest User

Untitled

a guest
Oct 20th, 2016
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. ---
  2. - hosts: 10.0.10.201 10.0.10.202
  3. gather_facts: no
  4. connection: local
  5.  
  6. tasks:
  7.  
  8. - name: obtain login credentials
  9. include_vars: secrets.yml
  10.  
  11. - name: define provider
  12. set_fact:
  13. provider:
  14. host: "{{ inventory_hostname }}"
  15. username: "{{ creds['username'] }}"
  16. password: "{{ creds['password'] }}"
  17. auth_pass: "{{ creds['auth_pass'] }}"
  18.  
  19. - name: deploy 6509 primary config
  20. ios_config:
  21. lines:
  22. - "{{ item }}"
  23. with_lines: "./configs/{{ inventory_hostname }}.txt"
  24. match: line
  25. provider: "{{ provider }}"
  26. when: "{{ inventory_hostname == '10.0.10.201'}}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement