Skip to content

Latest commit

 

History

History
187 lines (155 loc) · 6.6 KB

cisco.nxos.nxos_banner_module.rst

File metadata and controls

187 lines (155 loc) · 6.6 KB

cisco.nxos.nxos_banner

Manage multiline banners on Cisco NXOS devices

Version added: 1.0.0

  • 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.
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.

Note

- 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

Common return values are documented here, the following are the fields unique to this module:

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']


Authors

  • Trishna Guha (@trishnaguha)