2018-01-15 07:46:41 +00:00
|
|
|
---
|
|
|
|
- debug: msg="START eos eapi/net_banner.yaml on connection={{ ansible_connection }}"
|
|
|
|
|
|
|
|
# Add minimal testcase to check args are passed correctly to
|
|
|
|
# implementation module and module run is successful.
|
|
|
|
|
|
|
|
- name: Remove previous motd banner (setup)
|
|
|
|
eos_config:
|
|
|
|
lines: no banner motd
|
2018-05-29 18:18:03 +00:00
|
|
|
become: yes
|
2018-01-15 07:46:41 +00:00
|
|
|
|
|
|
|
- name: create motd
|
|
|
|
net_banner:
|
|
|
|
banner: motd
|
|
|
|
text: this is my motd banner configure by net_banner
|
|
|
|
state: present
|
2018-05-29 18:18:03 +00:00
|
|
|
become: yes
|
2018-01-15 07:46:41 +00:00
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- "result.changed == true"
|
2018-05-17 22:47:15 +00:00
|
|
|
- "'this is my motd banner configure by net_banner' in result.commands"
|
2018-01-15 07:46:41 +00:00
|
|
|
# Ensure sessions contains epoc. Will fail after 18th May 2033
|
|
|
|
- "'ansible_1' in result.session_name"
|
|
|
|
|
|
|
|
- name: Remove previous motd banner (teardown)
|
|
|
|
eos_config:
|
|
|
|
lines: no banner motd
|
2018-05-29 18:18:03 +00:00
|
|
|
become: yes
|
2018-01-15 07:46:41 +00:00
|
|
|
|
|
|
|
- debug: msg="END eos eapi/net_banner.yaml on connection={{ ansible_connection }}"
|