cisco / cisco.nxos / 7.0.0 / module / nxos_banner Manage multiline banners on Cisco NXOS devices | "added in version" 1.0.0 of cisco.nxos" Authors: Trishna Guha (@trishnaguha)cisco.nxos.nxos_banner (7.0.0) — module
Install with ansible-galaxy collection install cisco.nxos:==7.0.0
collections: - name: cisco.nxos version: 7.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.
- 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
text: 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). type: str state: choices: - present - absent default: present description: - Specifies whether or not the configuration is present in the current devices active running configuration. type: str banner: choices: - exec - motd description: - Specifies which banner that should be configured on the remote device. required: true type: str multiline_delimiter: default: '@' description: Specify the delimiting character than will be used for configuration. type: str
commands: description: The list of configuration mode commands to send to the device returned: always sample: - banner exec - this is my exec banner - that contains a multiline - string type: list