Network automation plugin for Ansible.
The plugin collects (captures) command-line (cli) output from and interacts with network equipment.
The intended audience of this plugin are system and network administrators and engineers.
The plugin will (in near future) work on both Windows and Linux operating systems.
The plugin's data abstraction format is YAML.
The plugin requires the presence of two binaries: ssh
and expect
.
It is as simple as:
pip install ansible-clicap-plugin
Then, use the plugin in Ansible playbooks, e.g. playbooks/collect_all.yml
:
---
- hosts:
- ny-fw01
gather_facts: no
vars:
ansible_connection: local
vars_files:
- "~/.clicap.vault.yml"
tasks:
- name: collect the output of all relevant operating system commands
action: clicap output=/tmp/data no_host_key_check=yes on_error=continue
Finally, run the playbook:
ansible-playbook -i hosts playbooks/collect_all.yml --vault-password-file ~/.vault.passwd -vvv
Please read the plugin's documentation for more information at Read the Docs and review the plugin's Demo directory.
Please open issues and ask questions in Github Issues.
Please contribute using the following Guidelines.