ansible/test/integration/targets/vyos_banner/tests/cli/basic-post-login.yaml
Trishna Guha 947e9aba45 Add vyos_banner implementation module (#25862)
* Add vyos_banner implementation module

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* vyos_banne integration test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* vyos_banner unit test

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>

* minor fix on banner text

Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
2017-06-20 08:53:03 +05:30

47 lines
1,005 B
YAML

---
- name: setup - remove post-login
vyos_banner:
banner: post-login
state: absent
provider: "{{ cli }}"
- name: Set post-login
vyos_banner:
banner: post-login
text: |
this is my post-login banner
that has a multiline
string
state: present
provider: "{{ cli }}"
register: result
- debug:
msg: "{{ result }}"
- assert:
that:
- "result.changed == true"
- "'this is my post-login banner' in result.commands"
- "'that has a multiline' in result.commands"
- name: Set post-login again (idempotent)
vyos_banner:
banner: post-login
text: |
this is my post-login banner
that has a multiline
string
state: present
provider: "{{ cli }}"
register: result
- assert:
that:
- "result.changed == false"
- "result.commands | length == 0"
# FIXME add in tests for everything defined in docs
# FIXME Test state:absent + test:
# FIXME Without powers ensure "privileged mode required"