New in version 2.4.
parameter | required | default | choices | comments |
---|---|---|---|---|
cfg_xml |
yes |
The config xml string.
|
||
rpc |
yes |
|
The type of rpc.
|
- name: CloudEngine netconf test hosts: cloudengine connection: local gather_facts: no vars: cli: host: "{{ inventory_hostname }}" port: "{{ ansible_ssh_port }}" username: "{{ username }}" password: "{{ password }}" transport: cli tasks: - name: "Netconf get operation" ce_netconf: rpc: get cfg_xml: '<filter type="subtree"> <vlan xmlns="http://www.huawei.com/netconf/vrp" content-version="1.0" format-version="1.0"> <vlans> <vlan> <vlanId>10</vlanId> <vlanif> <ifName></ifName> <cfgBand></cfgBand> <dampTime></dampTime> </vlanif> </vlan> </vlans> </vlan> </filter>' provider: "{{ cli }}" - name: "Netconf edit-config operation" ce_netconf: rpc: edit-config cfg_xml: '<config> <aaa xmlns="http://www.huawei.com/netconf/vrp" content-version="1.0" format-version="1.0"> <authenticationSchemes> <authenticationScheme operation="create"> <authenSchemeName>default_wdz</authenSchemeName> <firstAuthenMode>local</firstAuthenMode> <secondAuthenMode>invalid</secondAuthenMode> </authenticationScheme> </authenticationSchemes> </aaa> </config>' provider: "{{ cli }}" - name: "Netconf execute-action operation" ce_netconf: rpc: execute-action cfg_xml: '<action> <l2mc xmlns="http://www.huawei.com/netconf/vrp" content-version="1.0" format-version="1.0"> <l2McResetAllVlanStatis> <addrFamily>ipv4unicast</addrFamily> </l2McResetAllVlanStatis> </l2mc> </action>' provider: "{{ cli }}"
Common return values are documented here Return Values, the following are the fields unique to this module:
name | description | returned | type | sample |
---|---|---|---|---|
changed |
check to see if a change was made on the device
|
always | boolean | True |
end_state |
k/v pairs of aaa params after module execution
|
always | dict | {'result': ['ok']} |
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Testing Ansible and Developing Modules.