ssunlau.huawei_sw_interfaces_telnet
huawei-sw-interfaces_telnet
This Ansible role collects information about Huawei Switch interfaces using telnet. The goal of this project is to provide the same data (ansible_net_interfaces) as Cisco IOS.
Requirements
You need the following software:
- Ansible
- Git
- Python 2
Make sure you have these versions:
ansible version = 2.6.2
git version = 1.8.3.1-14
python2 version = 2.7.5
python2-pip version = 8.1.2-6
re (built-in Python)
sys (built-in Python)
json (built-in Python)
Role Variables
The variable {{ inventory_hostname }} is automatically set based on your playbook YAML file.
In default/main.yml, you'll find the variables needed to use this role:
{{ usr }} - Telnet username
{{ pwd }} - Telnet password
To change the variables, use the format "var: value". For example:
usr: username
pwd: password
Directory Structure
├── defaults
│ └── main.yml
├── files
│ ├── facts
│ └── interfaces.py
├── handlers
│ └── main.yml
├── meta
│ └── main.yml
├── README.md
├── tasks
│ └── main.yml
├── temp
├── templates
├── tests
│ ├── inventory
│ └── test.yml
└── vars
└── main.yml
Directory Highlights
├── files
│ ├── facts
│ └── interfaces.py
/files: Python scripts/files/facts: where the gathered information is stored
├── temp
/temp: temporary storage for scripts
Installation
Follow the Ansible Galaxy installation guide (https://galaxy.ansible.com/).
Example Playbook
Here’s an example of how to use this role in a playbook:
- hosts: CN2_EU_Huawei_telnet
gather_facts: false
connection: local
roles:
- role: huawei-sw-interface_telnet
License
This project is licensed under the MIT License.
Author Information
Chun Lau (https://github.com/ssunlau)
Informazioni sul progetto
gather facts - interfaces (Telnet) from Huawei Switches for Ansible
Installa
ansible-galaxy install ssunlau.huawei_sw_interfaces_telnetLicenza
Unknown
Download
170
Proprietario
A network guy comes from Hong Kong! Interested in network automation and 'lazy' configurations!
