From 2fc1d6618fa41191e756baec9f1bd30290ed23f9 Mon Sep 17 00:00:00 2001 From: Yaacov Zamir Date: Mon, 16 Oct 2017 02:30:34 +0300 Subject: [PATCH] fix the handeling of empty auth_key (#31753) --- .../modules/remote_management/manageiq/manageiq_provider.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/modules/remote_management/manageiq/manageiq_provider.py b/lib/ansible/modules/remote_management/manageiq/manageiq_provider.py index 772709a4974..6758f3a1996 100644 --- a/lib/ansible/modules/remote_management/manageiq/manageiq_provider.py +++ b/lib/ansible/modules/remote_management/manageiq/manageiq_provider.py @@ -443,7 +443,7 @@ class ManageIQProvider(object): # get role and authtype role = endpoint.get('role') or provider_defaults.get(endpoint_key + '_role', 'default') if role == 'default': - authtype = provider_defaults.get('authtype', role) + authtype = provider_defaults.get('authtype') or role else: authtype = role @@ -461,7 +461,7 @@ class ManageIQProvider(object): 'authtype': authtype, 'userid': endpoint.get('userid'), 'password': endpoint.get('password'), - 'auth_key': endpoint.get('auth_key', default_auth_key), + 'auth_key': endpoint.get('auth_key') or default_auth_key, } })