diff options
| author | omnom62 <omnom62@outlook.com> | 2026-05-06 08:08:27 +1000 |
|---|---|---|
| committer | omnom62 <omnom62@outlook.com> | 2026-05-06 08:08:27 +1000 |
| commit | 9a3fa5777e7203d46faf1185cfb56c4fc121d885 (patch) | |
| tree | 80988400ba3582cfc97ff6445fb8f97c724d3fc6 /docs | |
| parent | c2493986714604aa992bea28628b74587b3b51bd (diff) | |
| download | rest.vyos-9a3fa5777e7203d46faf1185cfb56c4fc121d885.tar.gz rest.vyos-9a3fa5777e7203d46faf1185cfb56c4fc121d885.zip | |
More modules
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/vyos.rest.vyos_banner_module.rst | 296 | ||||
| -rw-r--r-- | docs/vyos.rest.vyos_hostname_module.rst | 325 | ||||
| -rw-r--r-- | docs/vyos.rest.vyos_httpapi.rst | 18 | ||||
| -rw-r--r-- | docs/vyos.rest.vyos_image_module.rst | 227 | ||||
| -rw-r--r-- | docs/vyos.rest.vyos_logging_global_module.rst (renamed from docs/vyos.rest.vyos_snmp_server_module.rst) | 767 | ||||
| -rw-r--r-- | docs/vyos.rest.vyos_ntp_global_module.rst | 475 |
6 files changed, 379 insertions, 1729 deletions
diff --git a/docs/vyos.rest.vyos_banner_module.rst b/docs/vyos.rest.vyos_banner_module.rst deleted file mode 100644 index 7e7b285..0000000 --- a/docs/vyos.rest.vyos_banner_module.rst +++ /dev/null @@ -1,296 +0,0 @@ -.. _vyos.rest.vyos_banner_module: - - -********************* -vyos.rest.vyos_banner -********************* - -**Manage login banners on VyOS devices using REST API** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Configure pre-login and post-login banners on VyOS devices via REST API. -- Supports idempotent configuration using structured data. -- Multiline banner text is supported via YAML block scalars. -- Uses REST API (``connection=httpapi``) instead of CLI. -- VyOS stores multiline banners as a single string with literal ``\\n`` separators. - - - - -Parameters ----------- - -.. raw:: html - - <table border=0 cellpadding=0 class="documentation-table"> - <tr> - <th colspan="2">Parameter</th> - <th>Choices/<font color="blue">Defaults</font></th> - <th width="100%">Comments</th> - </tr> - <tr> - <td colspan="2"> - <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>config</b> - <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> - <div style="font-size: small"> - <span style="color: purple">dictionary</span> - / <span style="color: red">required</span> - </div> - </td> - <td> - </td> - <td> - <div>Banner configuration.</div> - </td> - </tr> - <tr> - <td class="elbow-placeholder"></td> - <td colspan="1"> - <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>banner</b> - <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> - <div style="font-size: small"> - <span style="color: purple">string</span> - / <span style="color: red">required</span> - </div> - </td> - <td> - <ul style="margin: 0; padding: 0"><b>Choices:</b> - <li>pre-login</li> - <li>post-login</li> - </ul> - </td> - <td> - <div>Banner type to configure.</div> - </td> - </tr> - <tr> - <td class="elbow-placeholder"></td> - <td colspan="1"> - <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>text</b> - <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> - <div style="font-size: small"> - <span style="color: purple">string</span> - </div> - </td> - <td> - </td> - <td> - <div>Banner text. Supports multiline strings via YAML block scalar (|).</div> - <div>Internally, real newlines are converted to literal <code>\\n</code> as VyOS expects.</div> - </td> - </tr> - - <tr> - <td colspan="2"> - <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>state</b> - <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> - <div style="font-size: small"> - <span style="color: purple">string</span> - </div> - </td> - <td> - <ul style="margin: 0; padding: 0"><b>Choices:</b> - <li><div style="color: blue"><b>merged</b> ←</div></li> - <li>replaced</li> - <li>overridden</li> - <li>deleted</li> - <li>gathered</li> - </ul> - </td> - <td> - <div>Desired state of the configuration.</div> - </td> - </tr> - </table> - <br/> - - -Notes ------ - -.. note:: - - This module requires ``ansible_connection=httpapi``. - - Banner text comparison is whitespace-normalized for idempotency. - - VyOS stores banner text as a leaf string value with literal ``\\n`` for newlines. - - For ``merged``, ``replaced``, and ``overridden`` states, the behaviour is identical for this single-leaf resource — the banner value is set to the desired text. - - - -Examples --------- - -.. code-block:: yaml - - - name: Configure single-line pre-login banner - vyos.rest.vyos_banner: - config: - banner: pre-login - text: "Unauthorized access is prohibited" - state: merged - - - name: Configure multiline post-login banner - vyos.rest.vyos_banner: - config: - banner: post-login - text: | - Welcome to VyOS - Authorized users only - Disconnect if you are not authorized - state: merged - - - name: Replace post-login banner - vyos.rest.vyos_banner: - config: - banner: post-login - text: "Welcome to VyOS" - state: replaced - - - name: Remove pre-login banner - vyos.rest.vyos_banner: - config: - banner: pre-login - state: deleted - - - name: Gather banner configuration - vyos.rest.vyos_banner: - config: - banner: pre-login - state: gathered - - - -Return Values -------------- -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: - -.. raw:: html - - <table border=0 cellpadding=0 class="documentation-table"> - <tr> - <th colspan="1">Key</th> - <th>Returned</th> - <th width="100%">Description</th> - </tr> - <tr> - <td colspan="1"> - <div class="ansibleOptionAnchor" id="return-"></div> - <b>after</b> - <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> - <div style="font-size: small"> - <span style="color: purple">dictionary</span> - </div> - </td> - <td>when changed</td> - <td> - <div>Configuration after changes (text uses real newlines).</div> - <br/> - <div style="font-size: smaller"><b>Sample:</b></div> - <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">{'banner': 'pre-login', 'text': 'New banner text'}</div> - </td> - </tr> - <tr> - <td colspan="1"> - <div class="ansibleOptionAnchor" id="return-"></div> - <b>before</b> - <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> - <div style="font-size: small"> - <span style="color: purple">dictionary</span> - </div> - </td> - <td>always</td> - <td> - <div>Configuration before changes (text uses real newlines).</div> - <br/> - <div style="font-size: smaller"><b>Sample:</b></div> - <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">{'banner': 'pre-login', 'text': 'Old banner text'}</div> - </td> - </tr> - <tr> - <td colspan="1"> - <div class="ansibleOptionAnchor" id="return-"></div> - <b>commands</b> - <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> - <div style="font-size: small"> - <span style="color: purple">list</span> - </div> - </td> - <td>when changes are required</td> - <td> - <div>List of API command dicts sent to the device.</div> - <br/> - <div style="font-size: smaller"><b>Sample:</b></div> - <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[{'op': 'set', 'path': ['system', 'login', 'banner', 'pre-login'], 'value': 'New banner text'}]</div> - </td> - </tr> - <tr> - <td colspan="1"> - <div class="ansibleOptionAnchor" id="return-"></div> - <b>gathered</b> - <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> - <div style="font-size: small"> - <span style="color: purple">dictionary</span> - </div> - </td> - <td>when state is gathered</td> - <td> - <div>Current device configuration (text uses real newlines).</div> - <br/> - <div style="font-size: smaller"><b>Sample:</b></div> - <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">{'banner': 'pre-login', 'text': 'Current banner text'}</div> - </td> - </tr> - <tr> - <td colspan="1"> - <div class="ansibleOptionAnchor" id="return-"></div> - <b>response</b> - <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> - <div style="font-size: small"> - <span style="color: purple">dictionary</span> - </div> - </td> - <td>when changes are applied</td> - <td> - <div>Raw response from VyOS REST API.</div> - <br/> - </td> - </tr> - <tr> - <td colspan="1"> - <div class="ansibleOptionAnchor" id="return-"></div> - <b>saved</b> - <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> - <div style="font-size: small"> - <span style="color: purple">dictionary</span> - </div> - </td> - <td>when changes are applied</td> - <td> - <div>Result of save_config call after applying changes.</div> - <br/> - </td> - </tr> - </table> - <br/><br/> - - -Status ------- - - -Authors -~~~~~~~ - -- Your Name (@yourhandle) diff --git a/docs/vyos.rest.vyos_hostname_module.rst b/docs/vyos.rest.vyos_hostname_module.rst deleted file mode 100644 index aa6e2ad..0000000 --- a/docs/vyos.rest.vyos_hostname_module.rst +++ /dev/null @@ -1,325 +0,0 @@ -.. _vyos.rest.vyos_hostname_module: - - -*********************** -vyos.rest.vyos_hostname -*********************** - -**Manage the hostname of a VyOS device using REST API** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Configures the system hostname on VyOS network devices via the REST API. -- Supports idempotent configuration — no change is made if the desired hostname already matches the running configuration. -- Uses REST API (``connection=httpapi``) instead of CLI. - - - - -Parameters ----------- - -.. raw:: html - - <table border=0 cellpadding=0 class="documentation-table"> - <tr> - <th colspan="2">Parameter</th> - <th>Choices/<font color="blue">Defaults</font></th> - <th width="100%">Comments</th> - </tr> - <tr> - <td colspan="2"> - <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>config</b> - <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> - <div style="font-size: small"> - <span style="color: purple">dictionary</span> - </div> - </td> - <td> - </td> - <td> - <div>Hostname configuration dictionary.</div> - </td> - </tr> - <tr> - <td class="elbow-placeholder"></td> - <td colspan="1"> - <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>hostname</b> - <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> - <div style="font-size: small"> - <span style="color: purple">string</span> - </div> - </td> - <td> - </td> - <td> - <div>The hostname to set on the VyOS device.</div> - <div>Must be a valid RFC 1123 hostname.</div> - </td> - </tr> - - <tr> - <td colspan="2"> - <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>state</b> - <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> - <div style="font-size: small"> - <span style="color: purple">string</span> - </div> - </td> - <td> - <ul style="margin: 0; padding: 0"><b>Choices:</b> - <li><div style="color: blue"><b>merged</b> ←</div></li> - <li>replaced</li> - <li>overridden</li> - <li>deleted</li> - <li>gathered</li> - </ul> - </td> - <td> - <div>The desired state of the hostname configuration.</div> - <div><code>merged</code>, <code>replaced</code>, and <code>overridden</code> are identical for this single-value resource — all three ensure the hostname is set to the value specified in <code>config</code>.</div> - <div><code>deleted</code> removes the configured hostname, reverting to the device default.</div> - <div><code>gathered</code> retrieves the current hostname from the device and returns it as structured data in the <code>gathered</code> key. No changes are made to the device.</div> - </td> - </tr> - </table> - <br/> - - -Notes ------ - -.. note:: - - Tested against VyOS 1.3 (equuleus) and 1.4 (sagitta). - - Requires ``ansible_connection=httpapi`` with the VyOS httpapi plugin. - - The ``ansible_network_os`` inventory variable must be set to ``vyos.rest.vyos``. - - - -Examples --------- - -.. code-block:: yaml - - # Before state: - # ------------- - # vyos@router:~$ show configuration commands | grep host-name - # set system host-name 'vyostest' - - - name: Set hostname using merged state - vyos.rest.vyos_hostname: - config: - hostname: vyos - state: merged - - # After state: - # ------------ - # set system host-name 'vyos' - - # ------------------------------------------------------------------------ - - # Before state: - # ------------- - # set system host-name 'vyos' - - - name: Override hostname (identical behaviour to merged for this resource) - vyos.rest.vyos_hostname: - config: - hostname: vyosTest - state: overridden - - # After state: - # ------------ - # set system host-name 'vyosTest' - - # ------------------------------------------------------------------------ - - # Before state: - # ------------- - # set system host-name 'vyos' - - - name: Replace hostname - vyos.rest.vyos_hostname: - config: - hostname: vyosRouter - state: replaced - - # After state: - # ------------ - # set system host-name 'vyosRouter' - - # ------------------------------------------------------------------------ - - # Before state: - # ------------- - # set system host-name 'vyos' - - - name: Delete configured hostname - vyos.rest.vyos_hostname: - state: deleted - - # After state: - # ------------ - # (no host-name entry — device reverts to default) - - # ------------------------------------------------------------------------ - - - name: Gather current hostname from device - vyos.rest.vyos_hostname: - state: gathered - - # Module result: - # -------------- - # "gathered": { - # "hostname": "vyos" - # } - - # ------------------------------------------------------------------------ - - - name: Idempotency — no change when hostname already matches - vyos.rest.vyos_hostname: - config: - hostname: vyos - state: merged - - # Module result (hostname already 'vyos'): - # ---------------------------------------- - # "changed": false - - - -Return Values -------------- -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: - -.. raw:: html - - <table border=0 cellpadding=0 class="documentation-table"> - <tr> - <th colspan="1">Key</th> - <th>Returned</th> - <th width="100%">Description</th> - </tr> - <tr> - <td colspan="1"> - <div class="ansibleOptionAnchor" id="return-"></div> - <b>after</b> - <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> - <div style="font-size: small"> - <span style="color: purple">dictionary</span> - </div> - </td> - <td>when changed</td> - <td> - <div>Hostname configuration on the device after this module ran.</div> - <br/> - <div style="font-size: smaller"><b>Sample:</b></div> - <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">{'hostname': 'vyos'}</div> - </td> - </tr> - <tr> - <td colspan="1"> - <div class="ansibleOptionAnchor" id="return-"></div> - <b>before</b> - <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> - <div style="font-size: small"> - <span style="color: purple">dictionary</span> - </div> - </td> - <td>when <em>state</em> is <code>merged</code>, <code>replaced</code>, <code>overridden</code> or <code>deleted</code></td> - <td> - <div>Hostname configuration on the device before this module ran.</div> - <br/> - <div style="font-size: smaller"><b>Sample:</b></div> - <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">{'hostname': 'vyostest'}</div> - </td> - </tr> - <tr> - <td colspan="1"> - <div class="ansibleOptionAnchor" id="return-"></div> - <b>commands</b> - <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> - <div style="font-size: small"> - <span style="color: purple">list</span> - </div> - </td> - <td>when <em>state</em> is <code>merged</code>, <code>replaced</code>, <code>overridden</code> or <code>deleted</code></td> - <td> - <div>List of API command dicts sent to the device.</div> - <br/> - <div style="font-size: smaller"><b>Sample:</b></div> - <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[{'op': 'set', 'path': ['system', 'host-name', 'vyos']}]</div> - </td> - </tr> - <tr> - <td colspan="1"> - <div class="ansibleOptionAnchor" id="return-"></div> - <b>gathered</b> - <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> - <div style="font-size: small"> - <span style="color: purple">dictionary</span> - </div> - </td> - <td>when <em>state</em> is <code>gathered</code></td> - <td> - <div>Current hostname configuration retrieved from the device as structured data. Returned only when <em>state</em> is <code>gathered</code>.</div> - <br/> - <div style="font-size: smaller"><b>Sample:</b></div> - <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">{'hostname': 'vyos'}</div> - </td> - </tr> - <tr> - <td colspan="1"> - <div class="ansibleOptionAnchor" id="return-"></div> - <b>response</b> - <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> - <div style="font-size: small"> - <span style="color: purple">dictionary</span> - </div> - </td> - <td>when changes are applied</td> - <td> - <div>Raw response returned by the VyOS REST API.</div> - <br/> - <div style="font-size: smaller"><b>Sample:</b></div> - <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">{'success': True, 'data': None, 'error': None}</div> - </td> - </tr> - <tr> - <td colspan="1"> - <div class="ansibleOptionAnchor" id="return-"></div> - <b>saved</b> - <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> - <div style="font-size: small"> - <span style="color: purple">dictionary</span> - </div> - </td> - <td>when changes are applied</td> - <td> - <div>Result of the save_config call issued after applying changes.</div> - <br/> - </td> - </tr> - </table> - <br/><br/> - - -Status ------- - - -Authors -~~~~~~~ - -- Your Name (@yourhandle) diff --git a/docs/vyos.rest.vyos_httpapi.rst b/docs/vyos.rest.vyos_httpapi.rst index 7d887b5..e493ebc 100644 --- a/docs/vyos.rest.vyos_httpapi.rst +++ b/docs/vyos.rest.vyos_httpapi.rst @@ -5,9 +5,10 @@ vyos.rest.vyos ************** -**VyOS REST API** +**HttpApi plugin for VyOS REST API** +Version added: 1.0.0 .. contents:: :local: @@ -16,7 +17,9 @@ vyos.rest.vyos Synopsis -------- -- HTTPAPI plugin for interacting with VyOS REST API. +- This HttpApi plugin provides methods to connect to VyOS devices via their HTTPS REST API. +- Use with ``ansible_connection=ansible.netcommon.httpapi`` and ``ansible_network_os=vyos.rest.vyos``. +- The VyOS REST API must be enabled with ``set service https api keys id ansible key YOUR_KEY``, ``set service https api rest``, then ``commit && save``. @@ -45,14 +48,13 @@ Parameters <td> </td> <td> - <div> ini entries: - <p>[httpapi]<br>api_key = VALUE</p> - </div> - <div>env:ANSIBLE_HTTPAPI_API_KEY</div> + <div>env:VYOS_API_KEY</div> <div>var: ansible_httpapi_api_key</div> + <div>var: ansible_vyos_api_key</div> </td> <td> - <div>VyOS API key</div> + <div>The API key configured on the VyOS device.</div> + <div>Set <code>ansible_httpapi_api_key</code> in inventory or the <code>VYOS_API_KEY</code> environment variable.</div> </td> </tr> </table> @@ -72,7 +74,7 @@ Status Authors ~~~~~~~ -- Evgeny Molotkov (@eomnom62) +- VyOS Community (@vyos) .. hint:: diff --git a/docs/vyos.rest.vyos_image_module.rst b/docs/vyos.rest.vyos_image_module.rst new file mode 100644 index 0000000..3dd396d --- /dev/null +++ b/docs/vyos.rest.vyos_image_module.rst @@ -0,0 +1,227 @@ +.. _vyos.rest.vyos_image_module: + + +******************** +vyos.rest.vyos_image +******************** + +**Manage VyOS system images via the REST API.** + + +Version added: 1.0.0 + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- +- Adds or removes VyOS system images using the HTTPS REST API (``/image`` endpoint). +- Use *state=present* to download and install an image from a URL. +- Use *state=absent* to delete an installed image by name. + + + +Requirements +------------ +The below requirements are needed on the host that executes this module. + +- VyOS 1.3+ + + +Parameters +---------- + +.. raw:: html + + <table border=0 cellpadding=0 class="documentation-table"> + <tr> + <th colspan="1">Parameter</th> + <th>Choices/<font color="blue">Defaults</font></th> + <th width="100%">Comments</th> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="parameter-"></div> + <b>api_key</b> + <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> + <div style="font-size: small"> + <span style="color: purple">string</span> + / <span style="color: red">required</span> + </div> + </td> + <td> + </td> + <td> + <div>API key configured on the device.</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="parameter-"></div> + <b>hostname</b> + <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> + <div style="font-size: small"> + <span style="color: purple">string</span> + / <span style="color: red">required</span> + </div> + </td> + <td> + </td> + <td> + <div>IP address or FQDN of the VyOS device.</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="parameter-"></div> + <b>name</b> + <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> + <div style="font-size: small"> + <span style="color: purple">string</span> + </div> + </td> + <td> + </td> + <td> + <div>Version name of the image to remove (e.g. <code>1.4-rolling-202401010000</code>).</div> + <div>Required when <em>state=absent</em>.</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="parameter-"></div> + <b>port</b> + <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> + <div style="font-size: small"> + <span style="color: purple">integer</span> + </div> + </td> + <td> + <b>Default:</b><br/><div style="color: blue">443</div> + </td> + <td> + <div>HTTPS port for the REST API.</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="parameter-"></div> + <b>state</b> + <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> + <div style="font-size: small"> + <span style="color: purple">string</span> + / <span style="color: red">required</span> + </div> + </td> + <td> + <ul style="margin: 0; padding: 0"><b>Choices:</b> + <li>present</li> + <li>absent</li> + </ul> + </td> + <td> + <div>{'<code>present</code>': 'Download and install the image from <em>url</em>.'}</div> + <div>{'<code>absent</code>': 'Delete the image specified by <em>name</em>.'}</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="parameter-"></div> + <b>timeout</b> + <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> + <div style="font-size: small"> + <span style="color: purple">integer</span> + </div> + </td> + <td> + <b>Default:</b><br/><div style="color: blue">300</div> + </td> + <td> + <div>Request timeout in seconds. Image downloads can take several minutes; increase this value accordingly.</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="parameter-"></div> + <b>url</b> + <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> + <div style="font-size: small"> + <span style="color: purple">string</span> + </div> + </td> + <td> + </td> + <td> + <div>HTTP(S) URL of the VyOS <code>.iso</code> file to install.</div> + <div>Required when <em>state=present</em>.</div> + </td> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="parameter-"></div> + <b>verify_ssl</b> + <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> + <div style="font-size: small"> + <span style="color: purple">boolean</span> + </div> + </td> + <td> + <ul style="margin: 0; padding: 0"><b>Choices:</b> + <li><div style="color: blue"><b>no</b> ←</div></li> + <li>yes</li> + </ul> + </td> + <td> + <div>Validate the device's TLS certificate.</div> + </td> + </tr> + </table> + <br/> + + + + + + + +Return Values +------------- +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: + +.. raw:: html + + <table border=0 cellpadding=0 class="documentation-table"> + <tr> + <th colspan="1">Key</th> + <th>Returned</th> + <th width="100%">Description</th> + </tr> + <tr> + <td colspan="1"> + <div class="ansibleOptionAnchor" id="return-"></div> + <b>output</b> + <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> + <div style="font-size: small"> + <span style="color: purple">string</span> + </div> + </td> + <td>success</td> + <td> + <div>Text output from the image add/delete operation.</div> + <br/> + </td> + </tr> + </table> + <br/><br/> + + +Status +------ + + +Authors +~~~~~~~ + +- VyOS Community (@vyos) diff --git a/docs/vyos.rest.vyos_snmp_server_module.rst b/docs/vyos.rest.vyos_logging_global_module.rst index 24651ec..718e646 100644 --- a/docs/vyos.rest.vyos_snmp_server_module.rst +++ b/docs/vyos.rest.vyos_logging_global_module.rst @@ -1,11 +1,11 @@ -.. _vyos.rest.vyos_snmp_server_module: +.. _vyos.rest.vyos_logging_global_module: -************************** -vyos.rest.vyos_snmp_server -************************** +***************************** +vyos.rest.vyos_logging_global +***************************** -**Manage SNMP server configuration on VyOS devices using REST API** +**Manage syslog configuration on VyOS devices using REST API** Version added: 1.0.0 @@ -17,8 +17,8 @@ Version added: 1.0.0 Synopsis -------- -- Manages SNMP server configuration on VyOS devices via the REST API. -- Supports communities, listen addresses, contact/location/description scalar fields, trap target, and SNMPv3 (engine ID, groups, users, views). +- Manages syslog (logging) configuration on VyOS devices via the REST API. +- Supports console, file, host, user, and global logging targets with per-target facility and severity configuration. - Uses REST API (``connection=httpapi``) instead of CLI. @@ -31,12 +31,12 @@ Parameters <table border=0 cellpadding=0 class="documentation-table"> <tr> - <th colspan="5">Parameter</th> + <th colspan="4">Parameter</th> <th>Choices/<font color="blue">Defaults</font></th> <th width="100%">Comments</th> </tr> <tr> - <td colspan="5"> + <td colspan="4"> <div class="ansibleOptionAnchor" id="parameter-"></div> <b>config</b> <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> @@ -47,123 +47,66 @@ Parameters <td> </td> <td> - <div>SNMP server configuration.</div> + <div>Logging configuration.</div> </td> </tr> <tr> <td class="elbow-placeholder"></td> - <td colspan="4"> - <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>communities</b> - <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> - <div style="font-size: small"> - <span style="color: purple">list</span> - / <span style="color: purple">elements=dictionary</span> - </div> - </td> - <td> - </td> - <td> - <div>SNMP community configuration.</div> - </td> - </tr> - <tr> - <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> <td colspan="3"> <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>authorization_type</b> + <b>console</b> <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> <div style="font-size: small"> - <span style="color: purple">string</span> + <span style="color: purple">dictionary</span> </div> </td> <td> - <ul style="margin: 0; padding: 0"><b>Choices:</b> - <li>ro</li> - <li>rw</li> - </ul> </td> <td> - <div>Authorization type.</div> + <div>Logging to serial console.</div> </td> </tr> - <tr> + <tr> <td class="elbow-placeholder"></td> <td class="elbow-placeholder"></td> - <td colspan="3"> + <td colspan="2"> <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>clients</b> + <b>facilities</b> <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> <div style="font-size: small"> <span style="color: purple">list</span> - / <span style="color: purple">elements=string</span> + / <span style="color: purple">elements=dictionary</span> </div> </td> <td> </td> <td> - <div>IP addresses of SNMP clients allowed to contact the system.</div> </td> </tr> - <tr> + <tr> <td class="elbow-placeholder"></td> <td class="elbow-placeholder"></td> - <td colspan="3"> + <td class="elbow-placeholder"></td> + <td colspan="1"> <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>name</b> + <b>facility</b> <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> <div style="font-size: small"> <span style="color: purple">string</span> - / <span style="color: red">required</span> </div> </td> <td> </td> <td> - <div>Community name.</div> </td> </tr> <tr> <td class="elbow-placeholder"></td> <td class="elbow-placeholder"></td> - <td colspan="3"> - <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>networks</b> - <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> - <div style="font-size: small"> - <span style="color: purple">list</span> - / <span style="color: purple">elements=string</span> - </div> - </td> - <td> - </td> - <td> - <div>Subnets of SNMP clients allowed to contact the system.</div> - </td> - </tr> - - <tr> <td class="elbow-placeholder"></td> - <td colspan="4"> - <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>contact</b> - <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> - <div style="font-size: small"> - <span style="color: purple">string</span> - </div> - </td> - <td> - </td> - <td> - <div>Contact person for the system.</div> - </td> - </tr> - <tr> - <td class="elbow-placeholder"></td> - <td colspan="4"> + <td colspan="1"> <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>description</b> + <b>severity</b> <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> <div style="font-size: small"> <span style="color: purple">string</span> @@ -172,14 +115,15 @@ Parameters <td> </td> <td> - <div>System description.</div> </td> </tr> + + <tr> <td class="elbow-placeholder"></td> - <td colspan="4"> + <td colspan="3"> <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>listen_addresses</b> + <b>files</b> <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> <div style="font-size: small"> <span style="color: purple">list</span> @@ -189,33 +133,32 @@ Parameters <td> </td> <td> - <div>IP addresses to listen for incoming SNMP requests.</div> + <div>Logging to local files.</div> </td> </tr> <tr> <td class="elbow-placeholder"></td> <td class="elbow-placeholder"></td> - <td colspan="3"> + <td colspan="2"> <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>address</b> + <b>archive</b> <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> <div style="font-size: small"> - <span style="color: purple">string</span> - / <span style="color: red">required</span> + <span style="color: purple">dictionary</span> </div> </td> <td> </td> <td> - <div>IP address.</div> </td> </tr> - <tr> + <tr> <td class="elbow-placeholder"></td> <td class="elbow-placeholder"></td> - <td colspan="3"> + <td class="elbow-placeholder"></td> + <td colspan="1"> <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>port</b> + <b>file_num</b> <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> <div style="font-size: small"> <span style="color: purple">integer</span> @@ -224,81 +167,32 @@ Parameters <td> </td> <td> - <div>UDP port (default 161).</div> </td> </tr> - <tr> <td class="elbow-placeholder"></td> - <td colspan="4"> - <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>location</b> - <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> - <div style="font-size: small"> - <span style="color: purple">string</span> - </div> - </td> - <td> - </td> - <td> - <div>System location.</div> - </td> - </tr> - <tr> <td class="elbow-placeholder"></td> - <td colspan="4"> - <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>smux_peer</b> - <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> - <div style="font-size: small"> - <span style="color: purple">string</span> - </div> - </td> - <td> - </td> - <td> - <div>Register a subtree for SMUX-based processing.</div> - </td> - </tr> - <tr> <td class="elbow-placeholder"></td> - <td colspan="4"> - <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>snmp_v3</b> - <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> - <div style="font-size: small"> - <span style="color: purple">dictionary</span> - </div> - </td> - <td> - </td> - <td> - <div>SNMPv3 configuration.</div> - </td> - </tr> - <tr> - <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> - <td colspan="3"> + <td colspan="1"> <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>engine_id</b> + <b>size</b> <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> <div style="font-size: small"> - <span style="color: purple">string</span> + <span style="color: purple">integer</span> </div> </td> <td> </td> <td> - <div>EngineID as a hex string.</div> </td> </tr> + <tr> <td class="elbow-placeholder"></td> <td class="elbow-placeholder"></td> - <td colspan="3"> + <td colspan="2"> <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>groups</b> + <b>facilities</b> <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> <div style="font-size: small"> <span style="color: purple">list</span> @@ -308,79 +202,49 @@ Parameters <td> </td> <td> - <div>SNMPv3 groups.</div> </td> </tr> <tr> <td class="elbow-placeholder"></td> <td class="elbow-placeholder"></td> <td class="elbow-placeholder"></td> - <td colspan="2"> - <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>group</b> - <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> - <div style="font-size: small"> - <span style="color: purple">string</span> - / <span style="color: red">required</span> - </div> - </td> - <td> - </td> - <td> - <div>Group name.</div> - </td> - </tr> - <tr> - <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> - <td colspan="2"> + <td colspan="1"> <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>mode</b> + <b>facility</b> <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> <div style="font-size: small"> <span style="color: purple">string</span> </div> </td> <td> - <ul style="margin: 0; padding: 0"><b>Choices:</b> - <li>ro</li> - <li>rw</li> - </ul> </td> <td> - <div>Access mode.</div> </td> </tr> <tr> <td class="elbow-placeholder"></td> <td class="elbow-placeholder"></td> <td class="elbow-placeholder"></td> - <td colspan="2"> + <td colspan="1"> <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>seclevel</b> + <b>severity</b> <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> <div style="font-size: small"> <span style="color: purple">string</span> </div> </td> <td> - <ul style="margin: 0; padding: 0"><b>Choices:</b> - <li>auth</li> - <li>priv</li> - </ul> </td> <td> - <div>Security level.</div> </td> </tr> + <tr> <td class="elbow-placeholder"></td> <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> <td colspan="2"> <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>view</b> + <b>path</b> <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> <div style="font-size: small"> <span style="color: purple">string</span> @@ -389,53 +253,31 @@ Parameters <td> </td> <td> - <div>View name for this group.</div> </td> </tr> <tr> <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> <td colspan="3"> <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>trap_targets</b> + <b>global_params</b> <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> <div style="font-size: small"> - <span style="color: purple">list</span> - / <span style="color: purple">elements=dictionary</span> + <span style="color: purple">dictionary</span> </div> </td> <td> </td> <td> - <div>SNMPv3 trap/inform targets.</div> + <div>Global syslog parameters (maps to <code>system syslog global</code>).</div> </td> </tr> <tr> <td class="elbow-placeholder"></td> <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> - <td colspan="2"> - <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>address</b> - <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> - <div style="font-size: small"> - <span style="color: purple">string</span> - </div> - </td> - <td> - </td> - <td> - <div>IP/IPv6 address of trap target.</div> - </td> - </tr> - <tr> - <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> <td colspan="2"> <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>authentication</b> + <b>archive</b> <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> <div style="font-size: small"> <span style="color: purple">dictionary</span> @@ -444,78 +286,32 @@ Parameters <td> </td> <td> - <div>Authentication for this trap target.</div> </td> </tr> <tr> <td class="elbow-placeholder"></td> <td class="elbow-placeholder"></td> <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> - <td colspan="1"> - <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>encrypted_key</b> - <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> - <div style="font-size: small"> - <span style="color: purple">string</span> - </div> - </td> - <td> - </td> - <td> - <div>Encrypted authentication password.</div> - </td> - </tr> - <tr> - <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> <td colspan="1"> <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>plaintext_key</b> + <b>file_num</b> <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> <div style="font-size: small"> - <span style="color: purple">string</span> + <span style="color: purple">integer</span> </div> </td> <td> </td> <td> - <div>Plaintext authentication password (will be encrypted on device).</div> </td> </tr> <tr> <td class="elbow-placeholder"></td> <td class="elbow-placeholder"></td> <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> <td colspan="1"> <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>type</b> - <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> - <div style="font-size: small"> - <span style="color: purple">string</span> - </div> - </td> - <td> - <ul style="margin: 0; padding: 0"><b>Choices:</b> - <li>md5</li> - <li>sha</li> - </ul> - </td> - <td> - <div>Authentication protocol.</div> - </td> - </tr> - - <tr> - <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> - <td colspan="2"> - <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>port</b> + <b>size</b> <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> <div style="font-size: small"> <span style="color: purple">integer</span> @@ -524,35 +320,33 @@ Parameters <td> </td> <td> - <div>TCP/UDP port for traps/informs.</div> </td> </tr> + <tr> <td class="elbow-placeholder"></td> <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> <td colspan="2"> <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>privacy</b> + <b>facilities</b> <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> <div style="font-size: small"> - <span style="color: purple">dictionary</span> + <span style="color: purple">list</span> + / <span style="color: purple">elements=dictionary</span> </div> </td> <td> </td> <td> - <div>Privacy for this trap target.</div> </td> </tr> <tr> <td class="elbow-placeholder"></td> <td class="elbow-placeholder"></td> <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> <td colspan="1"> <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>encrypted_key</b> + <b>facility</b> <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> <div style="font-size: small"> <span style="color: purple">string</span> @@ -561,17 +355,15 @@ Parameters <td> </td> <td> - <div>Encrypted privacy password.</div> </td> </tr> <tr> <td class="elbow-placeholder"></td> <td class="elbow-placeholder"></td> <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> <td colspan="1"> <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>plaintext_key</b> + <b>severity</b> <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> <div style="font-size: small"> <span style="color: purple">string</span> @@ -580,84 +372,51 @@ Parameters <td> </td> <td> - <div>Plaintext privacy password (will be encrypted on device).</div> - </td> - </tr> - <tr> - <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> - <td colspan="1"> - <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>type</b> - <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> - <div style="font-size: small"> - <span style="color: purple">string</span> - </div> - </td> - <td> - <ul style="margin: 0; padding: 0"><b>Choices:</b> - <li>des</li> - <li>aes</li> - </ul> - </td> - <td> - <div>Privacy protocol.</div> </td> </tr> <tr> <td class="elbow-placeholder"></td> <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> <td colspan="2"> <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>protocol</b> + <b>marker_interval</b> <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> <div style="font-size: small"> - <span style="color: purple">string</span> + <span style="color: purple">integer</span> </div> </td> <td> - <ul style="margin: 0; padding: 0"><b>Choices:</b> - <li>tcp</li> - <li>udp</li> - </ul> </td> <td> - <div>Notification protocol.</div> </td> </tr> <tr> <td class="elbow-placeholder"></td> <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> <td colspan="2"> <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>type</b> + <b>preserve_fqdn</b> <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> <div style="font-size: small"> - <span style="color: purple">string</span> + <span style="color: purple">boolean</span> </div> </td> <td> <ul style="margin: 0; padding: 0"><b>Choices:</b> - <li>inform</li> - <li>trap</li> + <li>no</li> + <li>yes</li> </ul> </td> <td> - <div>Notification type.</div> </td> </tr> <tr> <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> <td colspan="3"> <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>users</b> + <b>hosts</b> <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> <div style="font-size: small"> <span style="color: purple">list</span> @@ -667,35 +426,33 @@ Parameters <td> </td> <td> - <div>SNMPv3 users.</div> + <div>Logging to remote syslog hosts.</div> </td> </tr> <tr> <td class="elbow-placeholder"></td> <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> <td colspan="2"> <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>authentication</b> + <b>facilities</b> <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> <div style="font-size: small"> - <span style="color: purple">dictionary</span> + <span style="color: purple">list</span> + / <span style="color: purple">elements=dictionary</span> </div> </td> <td> </td> <td> - <div>Authentication configuration.</div> </td> </tr> <tr> <td class="elbow-placeholder"></td> <td class="elbow-placeholder"></td> <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> <td colspan="1"> <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>encrypted_key</b> + <b>facility</b> <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> <div style="font-size: small"> <span style="color: purple">string</span> @@ -704,17 +461,15 @@ Parameters <td> </td> <td> - <div>Encrypted authentication password.</div> </td> </tr> <tr> <td class="elbow-placeholder"></td> <td class="elbow-placeholder"></td> <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> <td colspan="1"> <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>plaintext_key</b> + <b>protocol</b> <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> <div style="font-size: small"> <span style="color: purple">string</span> @@ -723,197 +478,81 @@ Parameters <td> </td> <td> - <div>Plaintext authentication password (will be encrypted on device).</div> + <div>Per-facility protocol override.</div> </td> </tr> <tr> <td class="elbow-placeholder"></td> <td class="elbow-placeholder"></td> <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> <td colspan="1"> <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>type</b> + <b>severity</b> <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> <div style="font-size: small"> <span style="color: purple">string</span> </div> </td> <td> - <ul style="margin: 0; padding: 0"><b>Choices:</b> - <li>md5</li> - <li>sha</li> - </ul> </td> <td> - <div>Authentication protocol.</div> </td> </tr> <tr> <td class="elbow-placeholder"></td> <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> - <td colspan="2"> - <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>group</b> - <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> - <div style="font-size: small"> - <span style="color: purple">string</span> - </div> - </td> - <td> - </td> - <td> - <div>Group membership for this user.</div> - </td> - </tr> - <tr> - <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> - <td colspan="2"> - <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>mode</b> - <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> - <div style="font-size: small"> - <span style="color: purple">string</span> - </div> - </td> - <td> - <ul style="margin: 0; padding: 0"><b>Choices:</b> - <li>ro</li> - <li>rw</li> - </ul> - </td> - <td> - <div>Access mode.</div> - </td> - </tr> - <tr> - <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> <td colspan="2"> <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>privacy</b> - <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> - <div style="font-size: small"> - <span style="color: purple">dictionary</span> - </div> - </td> - <td> - </td> - <td> - <div>Privacy configuration.</div> - </td> - </tr> - <tr> - <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> - <td colspan="1"> - <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>encrypted_key</b> - <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> - <div style="font-size: small"> - <span style="color: purple">string</span> - </div> - </td> - <td> - </td> - <td> - <div>Encrypted privacy password.</div> - </td> - </tr> - <tr> - <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> - <td colspan="1"> - <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>plaintext_key</b> - <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> - <div style="font-size: small"> - <span style="color: purple">string</span> - </div> - </td> - <td> - </td> - <td> - <div>Plaintext privacy password (will be encrypted on device).</div> - </td> - </tr> - <tr> - <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> - <td colspan="1"> - <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>type</b> + <b>hostname</b> <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> <div style="font-size: small"> <span style="color: purple">string</span> </div> </td> <td> - <ul style="margin: 0; padding: 0"><b>Choices:</b> - <li>des</li> - <li>aes</li> - </ul> </td> <td> - <div>Privacy protocol.</div> </td> </tr> - <tr> <td class="elbow-placeholder"></td> <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> <td colspan="2"> <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>tsm_key</b> + <b>port</b> <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> <div style="font-size: small"> - <span style="color: purple">string</span> + <span style="color: purple">integer</span> </div> </td> <td> </td> <td> - <div>TSM certificate fingerprint or filename.</div> </td> </tr> <tr> <td class="elbow-placeholder"></td> <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> <td colspan="2"> <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>user</b> + <b>protocol</b> <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> <div style="font-size: small"> <span style="color: purple">string</span> - / <span style="color: red">required</span> </div> </td> <td> </td> <td> - <div>Username.</div> </td> </tr> <tr> <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> <td colspan="3"> <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>views</b> + <b>users</b> <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> <div style="font-size: small"> <span style="color: purple">list</span> @@ -923,34 +562,33 @@ Parameters <td> </td> <td> - <div>SNMPv3 views.</div> + <div>Logging to local user terminals.</div> </td> </tr> <tr> <td class="elbow-placeholder"></td> <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> <td colspan="2"> <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>exclude</b> + <b>facilities</b> <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> <div style="font-size: small"> - <span style="color: purple">string</span> + <span style="color: purple">list</span> + / <span style="color: purple">elements=dictionary</span> </div> </td> <td> </td> <td> - <div>Excluded OID subtree.</div> </td> </tr> - <tr> + <tr> <td class="elbow-placeholder"></td> <td class="elbow-placeholder"></td> <td class="elbow-placeholder"></td> - <td colspan="2"> + <td colspan="1"> <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>mask</b> + <b>facility</b> <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> <div style="font-size: small"> <span style="color: purple">string</span> @@ -959,16 +597,15 @@ Parameters <td> </td> <td> - <div>Bit-mask for OID subidentifiers.</div> </td> </tr> <tr> <td class="elbow-placeholder"></td> <td class="elbow-placeholder"></td> <td class="elbow-placeholder"></td> - <td colspan="2"> + <td colspan="1"> <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>oid</b> + <b>severity</b> <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> <div style="font-size: small"> <span style="color: purple">string</span> @@ -977,35 +614,31 @@ Parameters <td> </td> <td> - <div>OID for this view.</div> </td> </tr> + <tr> <td class="elbow-placeholder"></td> <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> <td colspan="2"> <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>view</b> + <b>username</b> <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> <div style="font-size: small"> <span style="color: purple">string</span> - / <span style="color: red">required</span> </div> </td> <td> </td> <td> - <div>View name.</div> </td> </tr> <tr> - <td class="elbow-placeholder"></td> <td colspan="4"> <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>trap_source</b> + <b>running_config</b> <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> <div style="font-size: small"> <span style="color: purple">string</span> @@ -1014,81 +647,12 @@ Parameters <td> </td> <td> - <div>SNMP trap source address.</div> + <div>Used only with state <code>parsed</code>.</div> </td> </tr> <tr> - <td class="elbow-placeholder"></td> <td colspan="4"> <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>trap_target</b> - <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> - <div style="font-size: small"> - <span style="color: purple">dictionary</span> - </div> - </td> - <td> - </td> - <td> - <div>SNMP trap target.</div> - </td> - </tr> - <tr> - <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> - <td colspan="3"> - <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>address</b> - <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> - <div style="font-size: small"> - <span style="color: purple">string</span> - </div> - </td> - <td> - </td> - <td> - <div>IP address of trap target.</div> - </td> - </tr> - <tr> - <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> - <td colspan="3"> - <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>community</b> - <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> - <div style="font-size: small"> - <span style="color: purple">string</span> - </div> - </td> - <td> - </td> - <td> - <div>Community string for traps.</div> - </td> - </tr> - <tr> - <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> - <td colspan="3"> - <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>port</b> - <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> - <div style="font-size: small"> - <span style="color: purple">integer</span> - </div> - </td> - <td> - </td> - <td> - <div>Destination port for trap notifications.</div> - </td> - </tr> - - - <tr> - <td colspan="5"> - <div class="ansibleOptionAnchor" id="parameter-"></div> <b>state</b> <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> <div style="font-size: small"> @@ -1102,26 +666,18 @@ Parameters <li>overridden</li> <li>deleted</li> <li>gathered</li> + <li>rendered</li> + <li>parsed</li> </ul> </td> <td> - <div>Desired state of SNMP configuration.</div> - <div><code>merged</code> adds or updates provided config without removing existing entries.</div> - <div><code>replaced</code> and <code>overridden</code> perform a full replacement — entries not in the task config are removed.</div> - <div><code>deleted</code> removes all SNMP configuration with a single delete command.</div> - <div><code>gathered</code> returns current device config as structured data, no changes made.</div> + <div>Desired state of the logging configuration.</div> </td> </tr> </table> <br/> -Notes ------ - -.. note:: - - Tested against VyOS 1.5q2. - Examples @@ -1129,74 +685,50 @@ Examples .. code-block:: yaml - - name: Merge SNMP configuration - vyos.rest.vyos_snmp_server: + - name: Merge logging configuration + vyos.rest.vyos_logging_global: config: - communities: - - name: switches - authorization_type: rw - - name: bridges - clients: - - 1.1.1.1 - - 12.1.1.10 - contact: admin2@ex.com - listen_addresses: - - address: 20.1.1.1 - - address: 100.1.2.1 - port: 33 - snmp_v3: - users: - - user: admin_user - authentication: - plaintext_key: abc1234567 - type: sha - privacy: - plaintext_key: abc1234567 - type: aes + console: + facilities: + - facility: local7 + severity: err + files: + - path: logFile + archive: + file_num: 2 + facilities: + - facility: local6 + severity: emerg + hosts: + - hostname: 172.16.0.1 + port: 223 + facilities: + - facility: local7 + severity: all + - facility: all + protocol: udp + users: + - username: vyos + facilities: + - facility: local7 + severity: debug + global_params: + archive: + file_num: 2 + size: 111 + facilities: + - facility: cron + severity: debug + marker_interval: 111 + preserve_fqdn: true state: merged - # ------------------------------------------------------------------------ - - - name: Replace SNMP configuration - vyos.rest.vyos_snmp_server: - config: - communities: - - name: bridges - networks: - - 1.1.1.0/24 - - 12.1.1.0/24 - location: "RDU, NC" - listen_addresses: - - address: 100.1.2.1 - port: 33 - snmp_v3: - groups: - - group: default - view: default - users: - - user: admin_user - authentication: - encrypted_key: 33f8bfd6b69ee03a184818a4daea503c9e579633 - type: sha - privacy: - encrypted_key: 33f8bfd6b69ee03a184818a4daea503c9e579633 - type: aes - group: default - views: - - view: default - oid: "1" - state: replaced - - # ------------------------------------------------------------------------ - - - name: Delete all SNMP configuration - vyos.rest.vyos_snmp_server: + - name: Delete all logging configuration + vyos.rest.vyos_logging_global: state: deleted - # ------------------------------------------------------------------------ - - - name: Gather current SNMP configuration - vyos.rest.vyos_snmp_server: + - name: Gather current logging configuration + vyos.rest.vyos_logging_global: state: gathered @@ -1224,7 +756,7 @@ Common return values are documented `here <https://docs.ansible.com/ansible/late </td> <td>when changed</td> <td> - <div>SNMP configuration after this module ran.</div> + <div>Logging configuration after this module ran.</div> <br/> </td> </tr> @@ -1237,9 +769,9 @@ Common return values are documented `here <https://docs.ansible.com/ansible/late <span style="color: purple">dictionary</span> </div> </td> - <td>when <em>state</em> is <code>merged</code>, <code>replaced</code>, <code>overridden</code> or <code>deleted</code></td> + <td>when state is merged, replaced, overridden or deleted</td> <td> - <div>SNMP configuration before this module ran.</div> + <div>Logging configuration before this module ran.</div> <br/> </td> </tr> @@ -1254,7 +786,7 @@ Common return values are documented `here <https://docs.ansible.com/ansible/late </td> <td>always</td> <td> - <div>List of API command dicts sent to the device.</div> + <div>List of API command tuples sent to the device.</div> <br/> </td> </tr> @@ -1267,24 +799,9 @@ Common return values are documented `here <https://docs.ansible.com/ansible/late <span style="color: purple">dictionary</span> </div> </td> - <td>when <em>state</em> is <code>gathered</code></td> - <td> - <div>Current SNMP configuration as structured data.</div> - <br/> - </td> - </tr> - <tr> - <td colspan="1"> - <div class="ansibleOptionAnchor" id="return-"></div> - <b>response</b> - <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> - <div style="font-size: small"> - <span style="color: purple">dictionary</span> - </div> - </td> - <td>when changes are applied</td> + <td>when state is gathered</td> <td> - <div>Raw API response.</div> + <div>Current logging configuration from the device.</div> <br/> </td> </tr> @@ -1314,4 +831,4 @@ Status Authors ~~~~~~~ -- your_name (@yourhandle) +- Sagar Paul (@KB-perByte) diff --git a/docs/vyos.rest.vyos_ntp_global_module.rst b/docs/vyos.rest.vyos_ntp_global_module.rst deleted file mode 100644 index 220797d..0000000 --- a/docs/vyos.rest.vyos_ntp_global_module.rst +++ /dev/null @@ -1,475 +0,0 @@ -.. _vyos.rest.vyos_ntp_global_module: - - -************************* -vyos.rest.vyos_ntp_global -************************* - -**Manage NTP configuration on VyOS devices using REST API** - - -Version added: 1.0.0 - -.. contents:: - :local: - :depth: 1 - - -Synopsis --------- -- Manages NTP server, allow-client, and listen-address configuration on VyOS devices via the REST API. -- Supports idempotent operation using structured data. -- Uses REST API (``connection=httpapi``) instead of CLI. -- Targets VyOS 1.4+ where NTP is managed by chronyd under ``service ntp``. - - - - -Parameters ----------- - -.. raw:: html - - <table border=0 cellpadding=0 class="documentation-table"> - <tr> - <th colspan="3">Parameter</th> - <th>Choices/<font color="blue">Defaults</font></th> - <th width="100%">Comments</th> - </tr> - <tr> - <td colspan="3"> - <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>config</b> - <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> - <div style="font-size: small"> - <span style="color: purple">dictionary</span> - </div> - </td> - <td> - </td> - <td> - <div>NTP configuration.</div> - </td> - </tr> - <tr> - <td class="elbow-placeholder"></td> - <td colspan="2"> - <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>allow_clients</b> - <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> - <div style="font-size: small"> - <span style="color: purple">list</span> - / <span style="color: purple">elements=string</span> - </div> - </td> - <td> - </td> - <td> - <div>List of client networks or addresses allowed to query this NTP server.</div> - <div>Maps to <code>service ntp allow-client address</code> on the device.</div> - </td> - </tr> - <tr> - <td class="elbow-placeholder"></td> - <td colspan="2"> - <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>listen_addresses</b> - <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> - <div style="font-size: small"> - <span style="color: purple">list</span> - / <span style="color: purple">elements=string</span> - </div> - </td> - <td> - </td> - <td> - <div>Local IP addresses the NTP service should listen on.</div> - <div>Maps to <code>service ntp listen-address</code> on the device.</div> - </td> - </tr> - <tr> - <td class="elbow-placeholder"></td> - <td colspan="2"> - <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>servers</b> - <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> - <div style="font-size: small"> - <span style="color: purple">list</span> - / <span style="color: purple">elements=dictionary</span> - </div> - </td> - <td> - </td> - <td> - <div>List of upstream NTP servers to synchronise from.</div> - </td> - </tr> - <tr> - <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> - <td colspan="1"> - <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>options</b> - <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> - <div style="font-size: small"> - <span style="color: purple">list</span> - / <span style="color: purple">elements=string</span> - </div> - </td> - <td> - <ul style="margin: 0; padding: 0"><b>Choices:</b> - <li>dynamic</li> - <li>noselect</li> - <li>pool</li> - <li>preempt</li> - <li>prefer</li> - <li>nts</li> - <li>ptp</li> - <li>interleave</li> - </ul> - </td> - <td> - <div>Per-server options.</div> - <div><code>pool</code> replaces <code>dynamic</code> in VyOS 1.3+.</div> - <div><code>nts</code> was added in VyOS 1.4.</div> - <div><code>ptp</code> and <code>interleave</code> were added in VyOS 1.5.</div> - <div><code>preempt</code> is only available in VyOS 1.3 and earlier.</div> - </td> - </tr> - <tr> - <td class="elbow-placeholder"></td> - <td class="elbow-placeholder"></td> - <td colspan="1"> - <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>server</b> - <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> - <div style="font-size: small"> - <span style="color: purple">string</span> - / <span style="color: red">required</span> - </div> - </td> - <td> - </td> - <td> - <div>Server hostname or IP address.</div> - </td> - </tr> - - - <tr> - <td colspan="3"> - <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>running_config</b> - <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> - <div style="font-size: small"> - <span style="color: purple">string</span> - </div> - </td> - <td> - </td> - <td> - <div>Used only with state <code>parsed</code>.</div> - <div>Provide the output of <code>show configuration commands | grep ntp</code> as a string. The module parses it into structured data and returns the result in the <code>parsed</code> key.</div> - <div>No device connection is required for this state.</div> - </td> - </tr> - <tr> - <td colspan="3"> - <div class="ansibleOptionAnchor" id="parameter-"></div> - <b>state</b> - <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a> - <div style="font-size: small"> - <span style="color: purple">string</span> - </div> - </td> - <td> - <ul style="margin: 0; padding: 0"><b>Choices:</b> - <li><div style="color: blue"><b>merged</b> ←</div></li> - <li>replaced</li> - <li>overridden</li> - <li>deleted</li> - <li>gathered</li> - <li>rendered</li> - <li>parsed</li> - </ul> - </td> - <td> - <div>The desired state of the NTP configuration.</div> - <div><code>merged</code> adds or updates the provided configuration without removing existing entries not mentioned in the task.</div> - <div><code>replaced</code> fully replaces the running NTP configuration with the provided config, removing entries not present in the task.</div> - <div><code>overridden</code> deletes all existing allow-client, listen-address, and server entries then applies the desired config from scratch.</div> - <div><code>deleted</code> removes all NTP allow-client, listen-address, and server entries managed by this module.</div> - <div><code>gathered</code> retrieves and returns the current NTP configuration as structured data. No changes are made to the device.</div> - <div><code>rendered</code> returns the CLI commands that would be generated for the provided config without connecting to the device.</div> - <div><code>parsed</code> parses the CLI output provided via <code>running_config</code> into structured data without connecting to the device.</div> - </td> - </tr> - </table> - <br/> - - -Notes ------ - -.. note:: - - Tested against VyOS 1.4 (sagitta) and 1.5. - - Requires ``ansible_connection=httpapi`` with the VyOS httpapi plugin. - - ``ansible_network_os`` must be set to ``vyos.rest.vyos``. - - ``replaced`` and ``overridden`` differ. ``replaced`` performs a surgical diff removing only entries not in the task. ``overridden`` deletes entire subtrees first then re-applies, which is safer when option ordering matters. - - The ``rendered`` and ``parsed`` states do not require a device connection. - - - -Examples --------- - -.. code-block:: yaml - - # Before state: - # ------------- - # set service ntp server time1.vyos.net - # set service ntp server time2.vyos.net - # set service ntp server time3.vyos.net - - - name: Merge NTP configuration - vyos.rest.vyos_ntp_global: - config: - allow_clients: - - 10.6.6.0/24 - listen_addresses: - - 10.1.3.1 - servers: - - server: 203.0.113.0 - options: - - prefer - state: merged - - # After state: - # ------------ - # set service ntp allow-client address '10.6.6.0/24' - # set service ntp listen-address '10.1.3.1' - # set service ntp server 203.0.113.0 prefer - # set service ntp server time1.vyos.net - # set service ntp server time2.vyos.net - # set service ntp server time3.vyos.net - - # ------------------------------------------------------------------------ - - - name: Replace NTP configuration - vyos.rest.vyos_ntp_global: - config: - allow_clients: - - 10.6.6.0/24 - listen_addresses: - - 10.1.3.1 - servers: - - server: 203.0.113.0 - options: - - prefer - state: replaced - - # ------------------------------------------------------------------------ - - - name: Override NTP configuration - vyos.rest.vyos_ntp_global: - config: - allow_clients: - - 10.3.3.0/24 - listen_addresses: - - 10.7.8.1 - servers: - - server: server1 - options: - - dynamic - - prefer - - server: server2 - options: - - noselect - - preempt - - server: serv - state: overridden - - # ------------------------------------------------------------------------ - - - name: Delete all managed NTP configuration - vyos.rest.vyos_ntp_global: - state: deleted - - # ------------------------------------------------------------------------ - - - name: Gather current NTP configuration - vyos.rest.vyos_ntp_global: - state: gathered - - # ------------------------------------------------------------------------ - - - name: Render NTP configuration commands offline - vyos.rest.vyos_ntp_global: - config: - allow_clients: - - 10.7.7.0/24 - - 10.8.8.0/24 - listen_addresses: - - 10.7.9.1 - servers: - - server: server7 - - server: server45 - options: - - noselect - - prefer - - pool - state: rendered - - # ------------------------------------------------------------------------ - - - name: Parse NTP configuration from CLI output - vyos.rest.vyos_ntp_global: - running_config: "{{ lookup('file', './ntp_config.cfg') }}" - state: parsed - - - -Return Values -------------- -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: - -.. raw:: html - - <table border=0 cellpadding=0 class="documentation-table"> - <tr> - <th colspan="1">Key</th> - <th>Returned</th> - <th width="100%">Description</th> - </tr> - <tr> - <td colspan="1"> - <div class="ansibleOptionAnchor" id="return-"></div> - <b>after</b> - <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> - <div style="font-size: small"> - <span style="color: purple">dictionary</span> - </div> - </td> - <td>when changed</td> - <td> - <div>NTP configuration after this module ran.</div> - <br/> - </td> - </tr> - <tr> - <td colspan="1"> - <div class="ansibleOptionAnchor" id="return-"></div> - <b>before</b> - <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> - <div style="font-size: small"> - <span style="color: purple">dictionary</span> - </div> - </td> - <td>when <em>state</em> is <code>merged</code>, <code>replaced</code>, <code>overridden</code> or <code>deleted</code></td> - <td> - <div>NTP configuration on the device before this module ran.</div> - <br/> - </td> - </tr> - <tr> - <td colspan="1"> - <div class="ansibleOptionAnchor" id="return-"></div> - <b>commands</b> - <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> - <div style="font-size: small"> - <span style="color: purple">list</span> - </div> - </td> - <td>always</td> - <td> - <div>List of API command tuples or dicts sent to the device.</div> - <br/> - </td> - </tr> - <tr> - <td colspan="1"> - <div class="ansibleOptionAnchor" id="return-"></div> - <b>gathered</b> - <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> - <div style="font-size: small"> - <span style="color: purple">dictionary</span> - </div> - </td> - <td>when <em>state</em> is <code>gathered</code></td> - <td> - <div>Current NTP configuration retrieved from the device as structured data.</div> - <br/> - </td> - </tr> - <tr> - <td colspan="1"> - <div class="ansibleOptionAnchor" id="return-"></div> - <b>parsed</b> - <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> - <div style="font-size: small"> - <span style="color: purple">dictionary</span> - </div> - </td> - <td>when <em>state</em> is <code>parsed</code></td> - <td> - <div>Structured data parsed from the <code>running_config</code> CLI output.</div> - <br/> - </td> - </tr> - <tr> - <td colspan="1"> - <div class="ansibleOptionAnchor" id="return-"></div> - <b>rendered</b> - <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> - <div style="font-size: small"> - <span style="color: purple">list</span> - </div> - </td> - <td>when <em>state</em> is <code>rendered</code></td> - <td> - <div>CLI commands generated for the provided configuration (offline, no device needed).</div> - <br/> - </td> - </tr> - <tr> - <td colspan="1"> - <div class="ansibleOptionAnchor" id="return-"></div> - <b>response</b> - <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> - <div style="font-size: small"> - <span style="color: purple">dictionary</span> - </div> - </td> - <td>when changes are applied</td> - <td> - <div>Raw API response from the VyOS REST API.</div> - <br/> - </td> - </tr> - <tr> - <td colspan="1"> - <div class="ansibleOptionAnchor" id="return-"></div> - <b>saved</b> - <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a> - <div style="font-size: small"> - <span style="color: purple">boolean</span> - </div> - </td> - <td>when changes are applied</td> - <td> - <div>Result of save_config after applying changes.</div> - <br/> - </td> - </tr> - </table> - <br/><br/> - - -Status ------- - - -Authors -~~~~~~~ - -- Varshitha Yataluru (@YVarshitha) |
