ansible/test/integration/targets/junos_banner/tests/netconf/net_banner.yml
Ganesh Nalawade c53dcd1982
Cleanup net integration test case for network modules (#34684)
*  Remove platform agnostic net_* test cases.
*  Add minimal platform agnostic test cases to individual
   platform-specific test cases
2018-01-10 21:28:49 +05:30

35 lines
No EOL
901 B
YAML

---
- 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 }}"