HuaweiSwitch / CloudEngine-Ansible

Ansible modules to automate HUAWEI CloudEngine switches
GNU General Public License v3.0
143 stars 51 forks source link

ABOUT

Huawei CloudEngine Switch support for using Ansible to deploy devices. The Huawei CloudEngine Ansible library, enables you to use Ansible to perform specific operational and configuration tasks on CloudEngine devices.

OVERVIEW OF MODULES

INSTALLATION

Circumstance instruction: Ansible network module is suitable for Ansible version 2.2. The available ncclient version is 0.5.3.

Main steps:

EXAMPLE USAGE

An example of static manifest for CloudEngine switch is followed. The network functions is satisfied based on the assumed that Ansible module is available.

root@localhost:~# ansible -m ce_command -a "commands='display vlan summary' transport='cli' host=192.168.1.1 port=22 username=huawei password=huawei123" localhost --connection local
localhost | SUCCESS => {
    "changed": false, 
    "stdout": [
        "Number of static VLAN: 3\nVLAN ID: 1 4001 to 4002 \n\nNumber of dynamic VLAN: 0\nVLAN ID: \n\nNumber of service VLAN: 62\nVLAN ID: 4030 to 4060 4064 to 4094 "
    ], 
    "stdout_lines": [
        [
            "Number of static VLAN: 3", 
            "VLAN ID: 1 4001 to 4002 ", 
            "", 
            "Number of dynamic VLAN: 0", 
            "VLAN ID: ", 
            "", 
            "Number of service VLAN: 62", 
            "VLAN ID: 4030 to 4060 4064 to 4094 "
        ]
    ], 
    "warnings": []
}

DEPENDENCIES

These modules require the following to be installed on the Ansible server:

REFERENCES