ansible_cache/ios_devices/device_audit.yml

25 lines
667 B
YAML
Raw Normal View History

2021-03-26 20:55:43 +00:00
---
## Playbook for reading and printing device information
2021-03-26 20:55:43 +00:00
- name: First playbook - reads and prints device info
hosts: homekit
2021-03-26 20:55:43 +00:00
gather_facts: false
connection: network_cli
2021-03-26 20:55:43 +00:00
roles:
- common
tasks:
- name: Collect device configuration
ios_facts:
2021-03-26 20:55:43 +00:00
gather_subset: all
register: current_config
- name: Print device identity info
debug:
msg: "{{ current_config.ansible_facts.ansible_net_hostname }} is reachable and the OS is {{ current_config.ansible_facts.ansible_net_version }}. SN is {{ current_config.ansible_facts.ansible_net_serialnum }}. Model is {{current_config.ansible_facts.ansible_net_model }}"