mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00: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:
committed by
GitHub
parent
99a4a3dc33
commit
69dd03d472
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user