From 021b926235287ea3e6a5261f55f22d68725508c6 Mon Sep 17 00:00:00 2001 From: Matt Martz Date: Fri, 24 Jan 2014 11:40:34 -0600 Subject: [PATCH] Only specify to USE_KEYRING as the api_key/password when we actually got a keyring_username from ~/.pyrax.cfg --- lib/ansible/module_utils/rax.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/ansible/module_utils/rax.py b/lib/ansible/module_utils/rax.py index a872473dadf..de6f2e93f80 100644 --- a/lib/ansible/module_utils/rax.py +++ b/lib/ansible/module_utils/rax.py @@ -45,7 +45,8 @@ def setup_rax_module(module, rax_module): username = username or os.environ.get('RAX_USERNAME') if not username: username = rax_module.get_setting('keyring_username') - api_key = 'USE_KEYRING' + if username: + api_key = 'USE_KEYRING' if not api_key: api_key = os.environ.get('RAX_API_KEY') credentials = (credentials or os.environ.get('RAX_CREDENTIALS') or