Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- - hosts: tst-rtr
- vars_files:
- - "/home/ansible_user/playbooks/secret.yaml"
- vars:
- provider:
- host: "{{ ansible_host }}"
- username: "{{ username }}"
- password: "{{ password }}"
- timeout: 4
- connection: local
- gather_facts: False
- tasks:
- # just a simple task to verify connection works properly
- - name: show clock
- ios_command:
- provider: "{{ provider }}"
- commands:
- - show clock
- register: output
- # print the output
- - name: print output
- debug:
- msg: "{{ output.stdout_lines[0] }}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement