mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Return a configured provider, not a bool
This commit is contained in:
parent
c585550955
commit
1c2821be26
1 changed files with 7 additions and 3 deletions
|
@ -260,10 +260,14 @@ def get_configured_provider():
|
|||
'''
|
||||
Return the first configured instance.
|
||||
'''
|
||||
return config.is_provider_configured(
|
||||
provider = config.is_provider_configured(
|
||||
__opts__, __active_provider_name__ or __virtualname__,
|
||||
('auth', 'region_name'), log_message=False,
|
||||
) or config.is_provider_configured(
|
||||
('auth', 'region_name')
|
||||
)
|
||||
if provider:
|
||||
return provider
|
||||
|
||||
return config.is_provider_configured(
|
||||
__opts__, __active_provider_name__ or __virtualname__,
|
||||
('cloud', 'region_name')
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue