Advertisement
Guest User

Untitled

a guest
Jan 19th, 2017
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. ---
  2. - name: A simple template with some configuration
  3. template:
  4. src: "templates/{{ os }}/simple.j2"
  5. dest: "{{ host_dir }}/simple.conf"
  6. changed_when: False
  7. # check_mode: no
  8. - name: Load configuration into the device
  9. ios_config:
  10. host: "{{ inventory_hostname }}"
  11. port: "{{ port }}"
  12. username: "{{ user }}"
  13. password: "{{ password }}"
  14. timeout: 30
  15. # ssh_keyfile: "/home/ansible/.ssh/id_rsa"
  16. backup: "yes"
  17. match: "line"
  18. replace: "line"
  19. # provider: "publickey"
  20. # multiline_delimiter: "@"
  21. src: "{{ host_dir }}/simple.conf"
  22. register: ios_config_output
  23. tags: [print_action]
  24. - debug:
  25. msg: "{{ host_dir }}/simple.conf"
  26. check_mode: no
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement