mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #27428 from rallytime/bp-27398
Back-port #27398 to 2015.8
This commit is contained in:
commit
d4d96bb3fc
1 changed files with 13 additions and 0 deletions
|
@ -8,6 +8,13 @@ maintains an index of minions that it creates and deletes. This index tracks the
|
|||
provider and profile configuration used to provision the minion, including
|
||||
authentication information. So long as this configuration remains current, it can
|
||||
be used by Salt SSH to log into any minion in the index.
|
||||
|
||||
To connect as a user other than root, modify the cloud configuration file
|
||||
usually located at /etc/salt/cloud. For example, add the following:
|
||||
|
||||
.. code-block:: yaml
|
||||
ssh_username: my_user
|
||||
sudo: True
|
||||
'''
|
||||
|
||||
# Import python libs
|
||||
|
@ -100,6 +107,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