1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

junos_user: additonal sshkey types added (#43685)

This commit is contained in:
rmudingay 2018-08-06 06:50:27 +02:00 committed by Ganesh Nalawade
parent c325fd9a46
commit 7feef1b64b

View file

@ -208,7 +208,14 @@ def map_obj_to_ele(module, want):
if item.get('sshkey'):
auth = SubElement(user, 'authentication')
ssh_rsa = SubElement(auth, 'ssh-rsa')
if 'ssh-rsa' in item['sshkey']:
ssh_rsa = SubElement(auth, 'ssh-rsa')
elif 'ssh-dss' in item['sshkey']:
ssh_rsa = SubElement(auth, 'ssh-dsa')
elif 'ecdsa-sha2' in item['sshkey']:
ssh_rsa = SubElement(auth, 'ssh-ecdsa')
elif 'ssh-ed25519' in item['sshkey']:
ssh_rsa = SubElement(auth, 'ssh-ed25519')
key = SubElement(ssh_rsa, 'name').text = item['sshkey']
return element