diff --git a/lib/ansible/constants.py b/lib/ansible/constants.py index 22aa3a807b3..b04e20cb88e 100644 --- a/lib/ansible/constants.py +++ b/lib/ansible/constants.py @@ -22,7 +22,9 @@ import traceback def get_config(p, section, key, env_var, default): if env_var is not None: - return os.environ.get(env_var, default) + value = os.environ.get(env_var, None) + if value is not None: + return value if p is not None: try: return p.get(section, key)