From 7599ba96bc3b659cb2a5f00b1be46ab6f55f48a6 Mon Sep 17 00:00:00 2001 From: omnom62 Date: Fri, 20 Mar 2026 21:50:13 +1000 Subject: precommit changes --- docs/vyos.rest.vyos_banner_module.rst | 262 ++++++++++++++++++++++++++++++++++ docs/vyos.rest.vyos_httpapi.rst | 79 ++++++++++ 2 files changed, 341 insertions(+) create mode 100644 docs/vyos.rest.vyos_banner_module.rst create mode 100644 docs/vyos.rest.vyos_httpapi.rst (limited to 'docs') diff --git a/docs/vyos.rest.vyos_banner_module.rst b/docs/vyos.rest.vyos_banner_module.rst new file mode 100644 index 0000000..f09f98b --- /dev/null +++ b/docs/vyos.rest.vyos_banner_module.rst @@ -0,0 +1,262 @@ +.. _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. +- Uses REST API (``connection=httpapi``) instead of CLI. + + + + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParameterChoices/DefaultsComments
+
+ config + +
+ dictionary + / required +
+
+ +
Banner configuration.
+
+
+ banner + +
+ string + / required +
+
+
    Choices: +
  • pre-login
  • +
  • post-login
  • +
+
+
Banner type to configure.
+
+
+ text + +
+ string +
+
+ +
Banner text (supports multiline string).
+
+
+ state + +
+ string +
+
+
    Choices: +
  • merged ←
  • +
  • replaced
  • +
  • overridden
  • +
  • deleted
  • +
  • gathered
  • +
+
+
Desired state of the configuration.
+
+
+ + +Notes +----- + +.. note:: + - This module requires ``ansible_connection=httpapi``. + - Banner text comparison is whitespace-normalized for idempotency. + + + +Examples +-------- + +.. code-block:: yaml + + - name: Configure pre-login banner + vyos.rest.vyos_banner: + config: + banner: pre-login + text: | + Unauthorized access is prohibited + Disconnect immediately + 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 `_, the following are the fields unique to this module: + +.. raw:: html + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
KeyReturnedDescription
+
+ after + +
+ dictionary +
+
when changed +
Configuration after changes.
+
+
+
+ before + +
+ dictionary +
+
always +
Configuration before changes.
+
+
+
+ commands + +
+ list +
+
when changes are required +
List of commands sent to the device.
+
+
+
+ gathered + +
+ dictionary +
+
when state is gathered +
Current device configuration.
+
+
+
+ response + +
+ dictionary +
+
when changes are applied +
Raw response from VyOS REST API.
+
+
+

+ + +Status +------ + + +Authors +~~~~~~~ + +- Your Name (@yourhandle) diff --git a/docs/vyos.rest.vyos_httpapi.rst b/docs/vyos.rest.vyos_httpapi.rst new file mode 100644 index 0000000..7d887b5 --- /dev/null +++ b/docs/vyos.rest.vyos_httpapi.rst @@ -0,0 +1,79 @@ +.. _vyos.rest.vyos_httpapi: + + +************** +vyos.rest.vyos +************** + +**VyOS REST API** + + + +.. contents:: + :local: + :depth: 1 + + +Synopsis +-------- +- HTTPAPI plugin for interacting with VyOS REST API. + + + + +Parameters +---------- + +.. raw:: html + + + + + + + + + + + + + + +
ParameterChoices/DefaultsConfigurationComments
+
+ api_key + +
+ string +
+
+ +
ini entries: +

[httpapi]
api_key = VALUE

+
+
env:ANSIBLE_HTTPAPI_API_KEY
+
var: ansible_httpapi_api_key
+
+
VyOS API key
+
+
+ + + + + + + + +Status +------ + + +Authors +~~~~~~~ + +- Evgeny Molotkov (@eomnom62) + + +.. hint:: + Configuration entries for each entry type have a low to high priority order. For example, a variable that is lower in the list will override a variable that is higher up. -- cgit v1.2.3