Advertisement
Guest User

Untitled

a guest
Jan 17th, 2019
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. ---
  2. - name: UPGRADE
  3. hosts: Switch
  4. roles:
  5. - Juniper.junos
  6. connection: local
  7. gather_facts: no
  8.  
  9. # vars:
  10. # credentials:
  11. # host: "{{ inventory_hostname }}"
  12. # username: "{{ juniper_user }}"
  13. # password: "{{ juniper_pw }}"
  14.  
  15.  
  16. tasks:
  17. # Check if a device is NETCONF-aware
  18. - name: CHECK-NETCONF
  19. tags: check-netconf
  20. connection: local
  21. wait_for: host="{{ inventory_hostname }}" port=830
  22.  
  23. - name: GET-MODEL
  24. tags: get-model
  25. connection: local
  26. junos_get_facts:
  27. #provider="{{ credentials }}"
  28. # user=ansible
  29. # passwd=password1
  30. host="{{ inventory_hostname }}"
  31. port="{{ juniper_port }}"
  32. savedir="/opt/juniper/junosfin"
  33. register: junosfin
  34.  
  35. - name: SHOW VARS
  36. tags: get-model
  37. debug: msg="DEVICE {{ junosfin.facts.hostname }}" | "MODEL {{ junosfin.facts.model }} | SOFTWARE {{ junosfin.facts.version }} | S/N {{ junosfin.facts.serialnumber }}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement