Last active
October 27, 2016 03:11
-
-
Save privateip/ae1994319beda217937fe5affe4e2540 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: veos01 | |
gather_facts: no | |
connection: local | |
vars: | |
eapi: | |
host: "{{ inventory_hostname }}" | |
username: admin | |
password: admin | |
authorize: yes | |
transport: eapi | |
tasks: | |
- name: collect eos facts | |
eos_facts: | |
gather_subset: all | |
provider: "{{ eapi }}" | |
register: facts | |
- name: write facts to file | |
copy: | |
content: "{{ facts.ansible_facts | to_nice_yaml }}" | |
dest: ./facts.txt | |
- name: show version | |
eos_command: | |
commands: show running-config | |
provider: "{{ eapi }}" | |
register: output | |
- name: write output to file | |
copy: | |
content: "{{ output.stdout[0] | to_nice_yaml }}" | |
dest: ./show_version.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment