Last active
October 31, 2015 01:05
-
-
Save jtdub/9fddec6d846585e03f00 to your computer and use it in GitHub Desktop.
sample playbook
This file contains 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
--- | |
- name: test command module as audit | |
hosts: netdevices | |
gather_facts: False | |
connection: local | |
tasks: | |
- name: gather facts | |
ntc_show_command: | |
connection: ssh | |
platform: "{{ platform }}" | |
username: "{{ username }}" | |
password: "{{ password }}" | |
host: "{{ inventory_hostname }}" | |
command: show ip interface brief | |
register: facts | |
- debug: var={{ item }} | |
with_items: facts.response | |
when: item.intf == 'Loopback0' | |
register: loopbacks | |
- debug: var="{{ loopbacks }}" |
Author
jtdub
commented
Oct 31, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment