2018-01-15 08:46:41 +01: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 20:18:03 +02:00
|
|
|
become: yes
|
2018-01-15 08:46:41 +01:00
|
|
|
|
|
|
|
- name: create motd
|
|
|
|
net_banner:
|
|
|
|
banner: motd
|
|
|
|
text: this is my motd banner configure by net_banner
|
|
|
|
state: present
|
2018-05-29 20:18:03 +02:00
|
|
|
become: yes
|
2018-01-15 08:46:41 +01:00
|
|
|
register: result
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
- "result.changed == true"
|
2018-05-18 00:47:15 +02:00
|
|
|
- "'this is my motd banner configure by net_banner' in result.commands"
|
2018-01-15 08:46:41 +01: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 20:18:03 +02:00
|
|
|
become: yes
|
2018-01-15 08:46:41 +01:00
|
|
|
|
|
|
|
- debug: msg="END eos eapi/net_banner.yaml on connection={{ ansible_connection }}"
|