mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Only specify to USE_KEYRING as the api_key/password when we actually got a keyring_username from ~/.pyrax.cfg
This commit is contained in:
parent
1ac7dffd55
commit
021b926235
1 changed files with 2 additions and 1 deletions
|
@ -45,7 +45,8 @@ def setup_rax_module(module, rax_module):
|
||||||
username = username or os.environ.get('RAX_USERNAME')
|
username = username or os.environ.get('RAX_USERNAME')
|
||||||
if not username:
|
if not username:
|
||||||
username = rax_module.get_setting('keyring_username')
|
username = rax_module.get_setting('keyring_username')
|
||||||
api_key = 'USE_KEYRING'
|
if username:
|
||||||
|
api_key = 'USE_KEYRING'
|
||||||
if not api_key:
|
if not api_key:
|
||||||
api_key = os.environ.get('RAX_API_KEY')
|
api_key = os.environ.get('RAX_API_KEY')
|
||||||
credentials = (credentials or os.environ.get('RAX_CREDENTIALS') or
|
credentials = (credentials or os.environ.get('RAX_CREDENTIALS') or
|
||||||
|
|
Loading…
Reference in a new issue