mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Merge pull request #19752 from rallytime/remove_sshpass_checks
Remove sshpass checks
This commit is contained in:
commit
56a52f9552
@ -195,7 +195,6 @@ Depends
|
||||
~~~~~~~
|
||||
|
||||
- `Salt Common`
|
||||
- `sshpass`
|
||||
- `Python MessagePack` (Messagepack C lib, or msgpack-pure)
|
||||
|
||||
Salt Cloud
|
||||
@ -220,7 +219,6 @@ Depends
|
||||
~~~~~~~
|
||||
|
||||
- `Salt Common`
|
||||
- `sshpass`
|
||||
- `apache libcloud` >= 0.14.0
|
||||
|
||||
Salt Doc
|
||||
|
@ -100,13 +100,6 @@ def create(vm_):
|
||||
'''
|
||||
Create a single VM from a data dict
|
||||
'''
|
||||
deploy = config.get_cloud_config_value('deploy', vm_, __opts__)
|
||||
if deploy is True and salt.utils.which('sshpass') is None:
|
||||
raise SaltCloudSystemExit(
|
||||
'Cannot deploy salt in a VM if the \'sshpass\' binary is not '
|
||||
'present on the system.'
|
||||
)
|
||||
|
||||
salt.utils.cloud.fire_event(
|
||||
'event',
|
||||
'starting create',
|
||||
@ -244,7 +237,6 @@ def create(vm_):
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
deployed = False
|
||||
if win_installer:
|
||||
deployed = salt.utils.cloud.deploy_windows(**deploy_kwargs)
|
||||
else:
|
||||
|
@ -158,17 +158,9 @@ def create(vm_):
|
||||
|
||||
salt-cloud -p profile_name vm_name
|
||||
'''
|
||||
deploy = config.get_cloud_config_value('deploy', vm_, __opts__)
|
||||
key_filename = config.get_cloud_config_value(
|
||||
'private_key', vm_, __opts__, search_global=False, default=None
|
||||
)
|
||||
if deploy is True and key_filename is None and \
|
||||
salt.utils.which('sshpass') is None:
|
||||
raise SaltCloudSystemExit(
|
||||
'Cannot deploy salt in a VM if the \'private_key\' setting '
|
||||
'is not set and \'sshpass\' binary is not present on the '
|
||||
'system for the password.'
|
||||
)
|
||||
|
||||
salt.utils.cloud.fire_event(
|
||||
'event',
|
||||
|
@ -535,14 +535,6 @@ def create(vm_):
|
||||
)
|
||||
)
|
||||
|
||||
if deploy is True and key_filename is None and \
|
||||
salt.utils.which('sshpass') is None:
|
||||
raise SaltCloudSystemExit(
|
||||
'Cannot deploy salt in a VM if the \'ssh_key_file\' setting '
|
||||
'is not set and \'sshpass\' binary is not present on the '
|
||||
'system for the password.'
|
||||
)
|
||||
|
||||
vm_['key_filename'] = key_filename
|
||||
|
||||
salt.utils.cloud.fire_event(
|
||||
|
@ -590,14 +590,6 @@ def create(vm_):
|
||||
)
|
||||
)
|
||||
|
||||
if deploy is True and key_filename is None and \
|
||||
salt.utils.which('sshpass') is None:
|
||||
raise SaltCloudSystemExit(
|
||||
'Cannot deploy salt in a VM if the \'ssh_key_file\' setting '
|
||||
'is not set and \'sshpass\' binary is not present on the '
|
||||
'system for the password.'
|
||||
)
|
||||
|
||||
vm_['key_filename'] = key_filename
|
||||
|
||||
salt.utils.cloud.fire_event(
|
||||
|
@ -258,13 +258,6 @@ def create(vm_):
|
||||
'''
|
||||
Create a single VM from a data dict
|
||||
'''
|
||||
deploy = config.get_cloud_config_value('deploy', vm_, __opts__)
|
||||
if deploy is True and salt.utils.which('sshpass') is None:
|
||||
raise SaltCloudSystemExit(
|
||||
'Cannot deploy salt in a VM if the \'sshpass\' binary is not '
|
||||
'present on the system.'
|
||||
)
|
||||
|
||||
salt.utils.cloud.fire_event(
|
||||
'event',
|
||||
'starting create',
|
||||
|
@ -477,12 +477,6 @@ def create(vm_):
|
||||
salt-cloud -p proxmox-ubuntu vmhostname
|
||||
'''
|
||||
ret = {}
|
||||
deploy = config.get_cloud_config_value('deploy', vm_, __opts__)
|
||||
if deploy is True and salt.utils.which('sshpass') is None:
|
||||
raise SaltCloudSystemExit(
|
||||
'Cannot deploy salt in a VM if the \'sshpass\' binary is not '
|
||||
'present on the system.'
|
||||
)
|
||||
|
||||
salt.utils.cloud.fire_event(
|
||||
'event',
|
||||
@ -647,7 +641,6 @@ def create(vm_):
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
deployed = False
|
||||
if win_installer:
|
||||
deployed = salt.utils.cloud.deploy_windows(**deploy_kwargs)
|
||||
else:
|
||||
|
@ -196,12 +196,6 @@ def create(vm_):
|
||||
Create a single VM from a data dict
|
||||
'''
|
||||
deploy = config.get_cloud_config_value('deploy', vm_, __opts__)
|
||||
if deploy is True and salt.utils.which('sshpass') is None:
|
||||
raise SaltCloudSystemExit(
|
||||
'Cannot deploy salt in a VM if the \'sshpass\' binary is not '
|
||||
'present on the system.'
|
||||
)
|
||||
|
||||
salt.utils.cloud.fire_event(
|
||||
'event',
|
||||
'starting create',
|
||||
@ -429,7 +423,6 @@ def create(vm_):
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
deployed = False
|
||||
if win_installer:
|
||||
deployed = salt.utils.cloud.deploy_windows(**deploy_kwargs)
|
||||
else:
|
||||
|
@ -69,9 +69,11 @@ def create(vm_):
|
||||
'No Deploy': '\'deploy\' is not enabled. Not deploying.'
|
||||
}
|
||||
}
|
||||
|
||||
key_filename = config.get_cloud_config_value(
|
||||
'key_filename', vm_, __opts__, search_global=False, default=None
|
||||
)
|
||||
|
||||
if key_filename is not None and not os.path.isfile(key_filename):
|
||||
raise SaltCloudConfigError(
|
||||
'The defined ssh_keyfile {0!r} does not exist'.format(
|
||||
@ -79,13 +81,6 @@ def create(vm_):
|
||||
)
|
||||
)
|
||||
|
||||
if key_filename is None and salt.utils.which('sshpass') is None:
|
||||
raise SaltCloudSystemExit(
|
||||
'Cannot deploy salt in a VM if the \'ssh_keyfile\' setting '
|
||||
'is not set and \'sshpass\' binary is not present on the '
|
||||
'system for the password.'
|
||||
)
|
||||
|
||||
ret = {}
|
||||
|
||||
log.info('Provisioning existing machine {0}'.format(vm_['name']))
|
||||
@ -185,7 +180,6 @@ def create(vm_):
|
||||
transport=__opts__['transport']
|
||||
)
|
||||
|
||||
deployed = False
|
||||
if win_installer:
|
||||
deployed = salt.utils.cloud.deploy_windows(**deploy_kwargs)
|
||||
else:
|
||||
|
@ -291,8 +291,8 @@ def bootstrap(version="develop",
|
||||
script = 'https://bootstrap.saltstack.com'
|
||||
for host in hosts.split(","):
|
||||
# Could potentially lean on salt-ssh utils to make
|
||||
# deployment easier on existing hosts (i.e. use sshpass,
|
||||
# or expect, pass better options to ssh etc)
|
||||
# deployment easier on existing hosts such as passing
|
||||
# better options to ssh
|
||||
subprocess.call(["ssh",
|
||||
"root@" if root_user else "" + host,
|
||||
"python -c 'import urllib; "
|
||||
|
@ -286,13 +286,6 @@ def bootstrap(vm_, opts):
|
||||
)
|
||||
)
|
||||
|
||||
if key_filename is None and salt.utils.which('sshpass') is None:
|
||||
raise SaltCloudSystemExit(
|
||||
'Cannot deploy salt in a VM if the \'ssh_keyfile\' setting '
|
||||
'is not set and \'sshpass\' binary is not present on the '
|
||||
'system for the password.'
|
||||
)
|
||||
|
||||
if key_filename is None and ('password' not in vm_ or not vm_['password']):
|
||||
raise SaltCloudSystemExit(
|
||||
'Cannot deploy salt in a VM if the \'ssh_keyfile\' setting '
|
||||
|
Loading…
Reference in New Issue
Block a user