mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Merge pull request #40115 from DarkKnightCZ/ssh-40114
Mark ssh_auth.present state as failure when public key is invalid
This commit is contained in:
commit
9d7cdbfac3
@ -356,9 +356,9 @@ def present(
|
||||
ret['comment'] = ('Failed to add the ssh key. Is the home '
|
||||
'directory available, and/or does the key file '
|
||||
'exist?')
|
||||
elif data == 'invalid':
|
||||
elif data == 'invalid' or data == 'Invalid public key':
|
||||
ret['result'] = False
|
||||
ret['comment'] = 'Invalid public ssh key, most likely has spaces'
|
||||
ret['comment'] = 'Invalid public ssh key, most likely has spaces or invalid syntax'
|
||||
|
||||
return ret
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user