ansible.builtin.vyos_banner (v2.4.6.0-1) — module

Manage multiline banners on VyOS devices

| "added in version" 2.4 of ansible.builtin"

Authors: Trishna Guha (@trishnaguha)

preview | supported by network

Install Ansible via pip

Install with pip install ansible==2.4.6.0.post1

Description

This will configure both pre-login and post-login banners on remote devices running VyOS. It allows playbooks to add or remote banner text from the active running configuration.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: configure the pre-login banner
  vyos_banner:
    banner: pre-login
    text: |
      this is my pre-login banner
      that contains a multiline
      string
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: remove the post-login banner
  vyos_banner:
    banner: post-login
    state: absent

Inputs

    
text:
    default: null
    description:
    - The banner text that should be present in the remote device running configuration.
      This argument accepts a multiline string, with no empty lines. Requires I(state=present).

state:
    choices:
    - present
    - absent
    default: present
    description:
    - Specifies whether or not the configuration is present in the current devices active
      running configuration.

banner:
    choices:
    - pre-login
    - post-login
    default: null
    description:
    - Specifies which banner that should be configured on the remote device.
    required: true

Outputs

commands:
  description: The list of configuration mode commands to send to the device
  returned: always
  sample:
  - banner pre-login
  - this is my pre-login banner
  - that contains a multiline
  - string
  type: list