mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
cloud roster: Check provider and profile configs for ssh_username
Pass the vm_ variable with provider and profile info to salt.utils.cloud.ssh_usernames in order to lookup ssh_username not only in the main salt-cloud config file but in provider and profile configuration as well. It is the same way all other settings are retrieved in the cloud roster.
This commit is contained in:
parent
a18250b2e4
commit
1b45c8e8c2
1 changed files with 1 additions and 1 deletions
|
@ -92,7 +92,7 @@ def targets(tgt, tgt_type='glob', **kwargs): # pylint: disable=W0613
|
|||
cloud_opts = salt.config.cloud_config(
|
||||
os.path.join(os.path.dirname(__opts__['conf_file']), 'cloud')
|
||||
)
|
||||
ssh_username = salt.utils.cloud.ssh_usernames({}, cloud_opts)
|
||||
ssh_username = salt.utils.cloud.ssh_usernames(vm_, cloud_opts)
|
||||
if isinstance(ssh_username, string_types):
|
||||
ret[tgt]['user'] = ssh_username
|
||||
elif isinstance(ssh_username, list):
|
||||
|
|
Loading…
Add table
Reference in a new issue