| 1 |
.. _cisco.iosxr.iosxr_netconf_module: |
| 2 |
|
| 3 |
|
| 4 |
************************* |
| 5 |
cisco.iosxr.iosxr_netconf |
| 6 |
************************* |
| 7 |
|
| 8 |
**Configures NetConf sub-system service on Cisco IOS-XR devices** |
| 9 |
|
| 10 |
|
| 11 |
Version added: 1.0.0 |
| 12 |
|
| 13 |
.. contents:: |
| 14 |
:local: |
| 15 |
:depth: 1 |
| 16 |
|
| 17 |
|
| 18 |
Synopsis |
| 19 |
-------- |
| 20 |
- This module provides an abstraction that enables and configures the netconf system service running on Cisco IOS-XR Software. This module can be used to easily enable the Netconf API. Netconf provides a programmatic interface for working with configuration and state resources as defined in RFC 6242. |
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
Parameters |
| 26 |
---------- |
| 27 |
|
| 28 |
.. raw:: html |
| 29 |
|
| 30 |
<table border=0 cellpadding=0 class="documentation-table"> |
| 31 |
<tr> |
| 32 |
<th colspan="1">Parameter</th> |
| 33 |
<th>Choices/<font color="blue">Defaults</font></th> |
| 34 |
<th width="100%">Comments</th> |
| 35 |
</tr> |
| 36 |
<tr> |
| 37 |
<td colspan="1"> |
| 38 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 39 |
<b>netconf_port</b> |
| 40 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 41 |
<div style="font-size: small"> |
| 42 |
<span style="color: purple">integer</span> |
| 43 |
</div> |
| 44 |
</td> |
| 45 |
<td> |
| 46 |
<b>Default:</b><br/><div style="color: blue">830</div> |
| 47 |
</td> |
| 48 |
<td> |
| 49 |
<div>This argument specifies the port the netconf service should listen on for SSH connections. The default port as defined in RFC 6242 is 830.</div> |
| 50 |
<div style="font-size: small; color: darkgreen"><br/>aliases: listens_on</div> |
| 51 |
</td> |
| 52 |
</tr> |
| 53 |
<tr> |
| 54 |
<td colspan="1"> |
| 55 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 56 |
<b>netconf_vrf</b> |
| 57 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 58 |
<div style="font-size: small"> |
| 59 |
<span style="color: purple">string</span> |
| 60 |
</div> |
| 61 |
</td> |
| 62 |
<td> |
| 63 |
<b>Default:</b><br/><div style="color: blue">"default"</div> |
| 64 |
</td> |
| 65 |
<td> |
| 66 |
<div>netconf vrf name</div> |
| 67 |
<div style="font-size: small; color: darkgreen"><br/>aliases: vrf</div> |
| 68 |
</td> |
| 69 |
</tr> |
| 70 |
<tr> |
| 71 |
<td colspan="1"> |
| 72 |
<div class="ansibleOptionAnchor" id="parameter-"></div> |
| 73 |
<b>state</b> |
| 74 |
<a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> |
| 75 |
<div style="font-size: small"> |
| 76 |
<span style="color: purple">string</span> |
| 77 |
</div> |
| 78 |
</td> |
| 79 |
<td> |
| 80 |
<ul style="margin: 0; padding: 0"><b>Choices:</b> |
| 81 |
<li><div style="color: blue"><b>present</b> ←</div></li> |
| 82 |
<li>absent</li> |
| 83 |
</ul> |
| 84 |
</td> |
| 85 |
<td> |
| 86 |
<div>Specifies the state of the <code>iosxr_netconf</code> resource on the remote device. If the <em>state</em> argument is set to <em>present</em> the netconf service will be configured. If the <em>state</em> argument is set to <em>absent</em> the netconf service will be removed from the configuration.</div> |
| 87 |
</td> |
| 88 |
</tr> |
| 89 |
</table> |
| 90 |
<br/> |
| 91 |
|
| 92 |
|
| 93 |
Notes |
| 94 |
----- |
| 95 |
|
| 96 |
.. note:: |
| 97 |
- This module works with connection ``network_cli``. See `the IOS-XR Platform Options <../network/user_guide/platform_iosxr.html>`_. |
| 98 |
- For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide <network_guide>` |
| 99 |
- For more information on using Ansible to manage Cisco devices see the `Cisco integration page <https://www.ansible.com/integrations/networks/cisco>`_. |
| 100 |
|
| 101 |
|
| 102 |
|
| 103 |
Examples |
| 104 |
-------- |
| 105 |
|
| 106 |
.. code-block:: yaml |
| 107 |
|
| 108 |
- name: enable netconf service on port 830 |
| 109 |
cisco.iosxr.iosxr_netconf: |
| 110 |
listens_on: 830 |
| 111 |
state: present |
| 112 |
|
| 113 |
- name: disable netconf service |
| 114 |
cisco.iosxr.iosxr_netconf: |
| 115 |
state: absent |
| 116 |
|
| 117 |
|
| 118 |
|
| 119 |
Return Values |
| 120 |
------------- |
| 121 |
Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module: |
| 122 |
|
| 123 |
.. raw:: html |
| 124 |
|
| 125 |
<table border=0 cellpadding=0 class="documentation-table"> |
| 126 |
<tr> |
| 127 |
<th colspan="1">Key</th> |
| 128 |
<th>Returned</th> |
| 129 |
<th width="100%">Description</th> |
| 130 |
</tr> |
| 131 |
<tr> |
| 132 |
<td colspan="1"> |
| 133 |
<div class="ansibleOptionAnchor" id="return-"></div> |
| 134 |
<b>commands</b> |
| 135 |
<a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> |
| 136 |
<div style="font-size: small"> |
| 137 |
<span style="color: purple">string</span> |
| 138 |
</div> |
| 139 |
</td> |
| 140 |
<td>when changed is True</td> |
| 141 |
<td> |
| 142 |
<div>Returns the command sent to the remote device</div> |
| 143 |
<br/> |
| 144 |
<div style="font-size: smaller"><b>Sample:</b></div> |
| 145 |
<div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">ssh server netconf port 830</div> |
| 146 |
</td> |
| 147 |
</tr> |
| 148 |
</table> |
| 149 |
<br/><br/> |
| 150 |
|
| 151 |
|
| 152 |
Status |
| 153 |
------ |
| 154 |
|
| 155 |
|
| 156 |
Authors |
| 157 |
~~~~~~~ |
| 158 |
|
| 159 |
- Kedar Kekan (@kedarX) |