Note
This module is part of the junipernetworks.junos collection (version 9.1.0).
You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install junipernetworks.junos. You need further requirements to be able to use this module, see Requirements for details.
To use it in a playbook, specify: junipernetworks.junos.junos_banner.
New in junipernetworks.junos 1.0.0
The below requirements are needed on the host that executes this module.
Parameter | Comments |
|---|---|
active boolean | Specifies whether or not the configuration is active or deactivated Choices:
|
banner string / required | Specifies which banner that should be configured on the remote device. Value Choices:
|
state string | Specifies whether or not the configuration is present in the current devices active running configuration. Choices:
|
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
netconf. See the Junos OS Platform Options.local connections for legacy playbooks.- name: configure the login banner
junipernetworks.junos.junos_banner:
banner: login
text: |
this is my login banner
that contains a multiline
string
state: present
- name: remove the motd banner
junipernetworks.junos.junos_banner:
banner: motd
state: absent
- name: deactivate the motd banner
junipernetworks.junos.junos_banner:
banner: motd
state: present
active: false
- name: activate the motd banner
junipernetworks.junos.junos_banner:
banner: motd
state: present
active: true
- name: Configure banner from file
junipernetworks.junos.junos_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 | Description |
|---|---|
diff.prepared string | Configuration difference before and after applying change. Returned: when configuration is changed and diff option is enabled. Sample: |
© 2012–2018 Michael DeHaan
© 2018–2025 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/junipernetworks/junos/junos_banner_module.html