mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
901 B
YAML
35 lines
901 B
YAML
7 years ago
|
---
|
||
|
- debug: msg="START junos net_banner netconf/net_banner.yaml on connection={{ ansible_connection }}"
|
||
|
|
||
|
- name: setup - remove login banner
|
||
|
net_banner:
|
||
|
banner: login
|
||
|
state: absent
|
||
|
provider: "{{ netconf }}"
|
||
|
|
||
|
- name: Create login banner
|
||
|
net_banner:
|
||
|
banner: login
|
||
|
text: this is my login banner configured by net_banner
|
||
|
state: present
|
||
|
provider: "{{ netconf }}"
|
||
|
register: result
|
||
|
|
||
|
- name: Get running configuration
|
||
|
junos_rpc:
|
||
|
rpc: get-configuration
|
||
|
provider: "{{ netconf }}"
|
||
|
register: config
|
||
|
|
||
|
- assert:
|
||
|
that:
|
||
|
- "result.changed == true"
|
||
|
- "'<message>this is my login banner configured by net_banner</message>' in config.xml"
|
||
|
|
||
|
- name: teardown - remove login banner
|
||
|
net_banner:
|
||
|
banner: login
|
||
|
state: absent
|
||
|
provider: "{{ netconf }}"
|
||
|
|
||
|
- debug: msg="END junos net_banner netconf/net_banner.yaml on connection={{ ansible_connection }}"
|