mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Allow cloud roster to use sudo
Similar to issue #26689, but I am using the cloud roster file to get the IP targets generated from running salt-cloud.
This commit is contained in:
parent
d76a77c911
commit
b4334649d5
1 changed files with 6 additions and 0 deletions
|
@ -99,6 +99,12 @@ def targets(tgt, tgt_type='glob', **kwargs): # pylint: disable=W0613
|
|||
)
|
||||
if key_filename:
|
||||
ret['tgt']['priv'] = key_filename
|
||||
|
||||
sudo = salt.config.get_cloud_config_value(
|
||||
'sudo', vm_, cloud_opts, search_global=False, default=None
|
||||
)
|
||||
if sudo:
|
||||
ret['tgt']['sudo'] = sudo
|
||||
|
||||
return ret
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue