---
- debug: msg="START net_banner junos/basic.yaml"
- 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
state: present
provider: "{{ netconf }}"
register: result
- assert:
that:
- "result.changed == true"
- "'this is my login banner' in result.rpc"
- name: Create login banner (idempotent)
net_banner:
banner: login
text: this is my login banner
state: present
provider: "{{ netconf }}"
register: result
- assert:
that:
- "result.changed == false"
- name: delete login banner
net_banner:
banner: login
state: absent
provider: "{{ netconf }}"
register: result
- assert:
that:
- "result.changed == true"
- "'' in result.rpc"
- name: setup - remove motd banner
net_banner:
banner: motd
state: absent
provider: "{{ netconf }}"
- name: Create motd banner
junos_banner:
banner: motd
text: this is my motd banner
state: present
provider: "{{ netconf }}"
register: result
- debug:
msg: "{{ result }}"
- assert:
that:
- "result.changed == true"
- "'this is my motd banner' in result.rpc"
- name: Create motd banner (idempotent)
net_banner:
banner: motd
text: this is my motd banner
state: present
provider: "{{ netconf }}"
register: result
- assert:
that:
- "result.changed == false"
- name: delete motd banner
junos_banner:
banner: motd
state: absent
provider: "{{ netconf }}"
register: result
- assert:
that:
- "result.changed == true"
- "'' in result.rpc"