mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
clean up auto deploy
This commit is contained in:
parent
f27efb4a5e
commit
15557f7134
@ -92,14 +92,16 @@ class SSH(object):
|
|||||||
'''
|
'''
|
||||||
Deploy the ssh key if the minions don't auth
|
Deploy the ssh key if the minions don't auth
|
||||||
'''
|
'''
|
||||||
|
if not isinstance(ret[host], basestring):
|
||||||
|
return ret
|
||||||
if ret[host].startswith('Permission denied'):
|
if ret[host].startswith('Permission denied'):
|
||||||
target = self.targets[host]
|
target = self.targets[host]
|
||||||
# permission denied, attempt to auto deploy ssh key
|
# permission denied, attempt to auto deploy ssh key
|
||||||
print(('Permission denied for host {0}, do you want to '
|
print(('Permission denied for host {0}, do you want to '
|
||||||
'deploy the salt-ssh key?'))
|
'deploy the salt-ssh key?').format(host))
|
||||||
deploy = raw_input('[Y/n]')
|
deploy = raw_input('[Y/n]')
|
||||||
if deploy.startswith(('n', 'N')):
|
if deploy.startswith(('n', 'N')):
|
||||||
continue
|
return ret
|
||||||
target['passwd'] = getpass.getpass(
|
target['passwd'] = getpass.getpass(
|
||||||
'Password for {0}:'.format(host)
|
'Password for {0}:'.format(host)
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user