mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-01 06:41:26 -07:00
fix vyos_banner multiline string issue (#26383)
Signed-off-by: Trishna Guha <trishnaguha17@gmail.com>
This commit is contained in:
parent
df0864d801
commit
ad3fe08aae
4 changed files with 8 additions and 11 deletions
|
@ -22,8 +22,8 @@
|
|||
- assert:
|
||||
that:
|
||||
- "result.changed == true"
|
||||
- "'this is my post-login banner' in result.commands"
|
||||
- "'that has a multiline' in result.commands"
|
||||
- "'this is my post-login banner' in result.commands[0]"
|
||||
- "'that has a multiline' in result.commands[0]"
|
||||
|
||||
- name: Set post-login again (idempotent)
|
||||
vyos_banner:
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
- assert:
|
||||
that:
|
||||
- "result.changed == true"
|
||||
- "'this is my pre-login banner' in result.commands"
|
||||
- "'that has a multiline' in result.commands"
|
||||
- "'this is my pre-login banner' in result.commands[0]"
|
||||
- "'that has a multiline' in result.commands[0]"
|
||||
|
||||
- name: Set pre-login again (idempotent)
|
||||
vyos_banner:
|
||||
|
|
|
@ -44,7 +44,7 @@ class TestVyosBannerModule(TestVyosModule):
|
|||
|
||||
def test_vyos_banner_create(self):
|
||||
set_module_args(dict(banner='pre-login', text='test\nbanner\nstring'))
|
||||
commands = ["set system login banner pre-login 'test\nbanner\nstring'"]
|
||||
commands = ["set system login banner pre-login 'test\\nbanner\\nstring'"]
|
||||
self.execute_module(changed=True, commands=commands)
|
||||
|
||||
def test_vyos_banner_remove(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue