New in version 2.2.
- python >= 2.6
- ncclient
parameter | required | default | choices | comments |
---|---|---|---|---|
host |
yes | the hostname or ip address of the netconf device | ||
hostkey_verify |
no | True | if true, the ssh host key of the device must match a ssh key present on the host if false, the ssh host key of the device is not checked | |
password |
yes | password of the user to authenticate with | ||
port |
no | 830 | the netconf port | |
username |
yes | the username to authenticate with | ||
xml |
yes | the XML content to send to the device |
- name: set ntp server in the device netconf_config: host: 10.0.0.1 username: admin password: admin xml: | <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0"> <system xmlns="urn:ietf:params:xml:ns:yang:ietf-system"> <ntp> <enabled>true</enabled> <server> <name>ntp1</name> <udp><address>127.0.0.1</address></udp> </server> </ntp> </system> </config> - name: wipe ntp configuration netconf_config: host: 10.0.0.1 username: admin password: admin xml: | <config xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0"> <system xmlns="urn:ietf:params:xml:ns:yang:ietf-system"> <ntp> <enabled>false</enabled> <server operation="remove"> <name>ntp1</name> </server> </ntp> </system> </config>
Common return values are documented here Return Values, the following are the fields unique to this module:
name | description | returned | type | sample |
---|---|---|---|---|
server_capabilities | list of capabilities of the server | success | list | ['urn:ietf:params:netconf:base:1.1', 'urn:ietf:params:netconf:capability:confirmed-commit:1.0', 'urn:ietf:params:netconf:capability:candidate:1.0'] |
Note
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
This module is community maintained without core committer oversight.
For more information on what this means please read Module Support
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Helping Testing PRs and Developing Modules.