Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- - name: UPGRADE
- hosts: Switch
- roles:
- - Juniper.junos
- connection: local
- gather_facts: no
- # vars:
- # credentials:
- # host: "{{ inventory_hostname }}"
- # username: "{{ juniper_user }}"
- # password: "{{ juniper_pw }}"
- tasks:
- # Check if a device is NETCONF-aware
- - name: CHECK-NETCONF
- tags: check-netconf
- connection: local
- wait_for: host="{{ inventory_hostname }}" port=830
- - name: GET-MODEL
- tags: get-model
- connection: local
- junos_get_facts:
- #provider="{{ credentials }}"
- # user=ansible
- # passwd=password1
- host="{{ inventory_hostname }}"
- port="{{ juniper_port }}"
- savedir="/opt/juniper/junosfin"
- register: junosfin
- - name: SHOW VARS
- tags: get-model
- 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