diff --git a/changelogs/fragments/3561-fix-ipa-host-var-detection.yml b/changelogs/fragments/3561-fix-ipa-host-var-detection.yml new file mode 100644 index 0000000000..4b5f23f174 --- /dev/null +++ b/changelogs/fragments/3561-fix-ipa-host-var-detection.yml @@ -0,0 +1,2 @@ +bugfixes: + - ipa_* modules - fix environment fallback for ``ipa_host`` option (https://github.com/ansible-collections/community.general/issues/3560). diff --git a/plugins/module_utils/ipa.py b/plugins/module_utils/ipa.py index b2b1a892cd..0e456d18ea 100644 --- a/plugins/module_utils/ipa.py +++ b/plugins/module_utils/ipa.py @@ -31,6 +31,7 @@ def _env_then_dns_fallback(*args, **kwargs): result = env_fallback(*args, **kwargs) if result == '': raise AnsibleFallbackNotFound + return result except AnsibleFallbackNotFound: # If no host was given, we try to guess it from IPA. # The ipa-ca entry is a standard entry that IPA will have set for