mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-21 16:39:08 -07:00
ios_user: Add support for multiple sshkeys (#51173)
* Add support for multiple sshkeys Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com> * Fix CI Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com> * Add the keys at on go Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com> * Update tests Signed-off-by: NilashishC <nilashishchakraborty8@gmail.com>
This commit is contained in:
parent
99a4a3dc33
commit
69dd03d472
2 changed files with 49 additions and 18 deletions
|
@ -128,3 +128,16 @@ class TestIosUserModule(TestIosModule):
|
|||
]
|
||||
result = self.execute_module(changed=True, commands=commands)
|
||||
self.assertEqual(result['commands'], commands)
|
||||
|
||||
def test_ios_user_set_sshkey_multiple(self):
|
||||
set_module_args(dict(name='ansible', sshkey=['dGVzdA==', 'eHWacB2==']))
|
||||
commands = [
|
||||
'ip ssh pubkey-chain',
|
||||
'username ansible',
|
||||
'key-hash ssh-rsa 098F6BCD4621D373CADE4E832627B4F6',
|
||||
'key-hash ssh-rsa A019918340A1E9183388D9A675603036',
|
||||
'exit',
|
||||
'exit'
|
||||
]
|
||||
result = self.execute_module(changed=True, commands=commands)
|
||||
self.assertEqual(result['commands'], commands)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue