.. _cisco.nxos.nxos_banner_module: ********************** cisco.nxos.nxos_banner ********************** **Manage multiline banners on Cisco NXOS devices** Version added: 1.0.0 .. contents:: :local: :depth: 1 Synopsis -------- - This will configure both exec and motd banners on remote devices running Cisco NXOS. It allows playbooks to add or remove banner text from the active running configuration. Parameters ---------- .. raw:: html
Parameter Choices/Defaults Comments
banner
string / required
    Choices:
  • exec
  • motd
Specifies which banner that should be configured on the remote device.
multiline_delimiter
string
Default:
"@"
Specify the delimiting character than will be used for configuration.
state
string
    Choices:
  • present ←
  • absent
Specifies whether or not the configuration is present in the current devices active running configuration.
text
string
The banner text that should be present in the remote device running configuration. This argument accepts a multiline string, with no empty lines. Requires state=present.

Notes ----- .. note:: - Since responses from the device are always read with surrounding whitespaces stripped, tasks that configure banners with preceeding or trailing whitespaces will not be idempotent. - Limited Support for Cisco MDS - For information on using CLI and NX-API see the :ref:`NXOS Platform Options guide ` - For more information on using Ansible to manage network devices see the :ref:`Ansible Network Guide ` - For more information on using Ansible to manage Cisco devices see the `Cisco integration page `_. Examples -------- .. code-block:: yaml - name: configure the exec banner cisco.nxos.nxos_banner: banner: exec text: | this is my exec banner that contains a multiline string state: present - name: remove the motd banner cisco.nxos.nxos_banner: banner: motd state: absent - name: Configure banner from file cisco.nxos.nxos_banner: banner: motd text: "{{ lookup('file', './config_partial/raw_banner.cfg') }}" state: present Return Values ------------- Common return values are documented `here `_, the following are the fields unique to this module: .. raw:: html
Key Returned Description
commands
list
always
The list of configuration mode commands to send to the device

Sample:
['banner exec', 'this is my exec banner', 'that contains a multiline', 'string']


Status ------ Authors ~~~~~~~ - Trishna Guha (@trishnaguha)