diff --git a/lookup_plugins/re2oapi.py b/lookup_plugins/re2oapi.py index cfcc2757..044b630d 100644 --- a/lookup_plugins/re2oapi.py +++ b/lookup_plugins/re2oapi.py @@ -527,8 +527,8 @@ class LookupModule(LookupBase): if (api_username is None and api_password is None and self._use_cpasswords): display.vvv("Using cpasswords vault to get API credentials.") - api_username = variables.get('vault_re2o_service_user') - api_password = variables.get('vault_re2o_service_password') + api_username = variables.get('vault', {}).get('re2o_service_user') + api_password = variables.get('vault', {}).get('re2o_service_password') if api_username is None: raise AnsibleError(to_native(