From 3a5a61b7830cdd5767b6efca955d15477d2c015a Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Thu, 16 Jun 2022 13:03:52 -0400 Subject: [PATCH] hide distro map since it is not configurable (#78068) make it a private setting for internal use and avoid user confusion by not displaying it with normal configuration options --- changelogs/fragments/hide_distro_map.yml | 2 ++ lib/ansible/config/base.yml | 2 +- lib/ansible/executor/interpreter_discovery.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 changelogs/fragments/hide_distro_map.yml diff --git a/changelogs/fragments/hide_distro_map.yml b/changelogs/fragments/hide_distro_map.yml new file mode 100644 index 00000000000..63798f4f4fd --- /dev/null +++ b/changelogs/fragments/hide_distro_map.yml @@ -0,0 +1,2 @@ +minor_changes: + - configuration entry INTERPRETER_PYTHON_DISTRO_MAP is now 'private' and won't show up in normal configuration queries and docs, since it is not 'settable' this avoids user confusion. diff --git a/lib/ansible/config/base.yml b/lib/ansible/config/base.yml index ff1614299c6..b3cb511720f 100644 --- a/lib/ansible/config/base.yml +++ b/lib/ansible/config/base.yml @@ -1529,7 +1529,7 @@ INTERPRETER_PYTHON: installed later may change which one is used). This warning behavior can be disabled by setting ``auto_silent`` or ``auto_legacy_silent``. The value of ``auto_legacy`` provides all the same behavior, but for backwards-compatibility with older Ansible releases that always defaulted to ``/usr/bin/python``, will use that interpreter if present. -INTERPRETER_PYTHON_DISTRO_MAP: +_INTERPRETER_PYTHON_DISTRO_MAP: name: Mapping of known included platform pythons for various Linux distros default: redhat: diff --git a/lib/ansible/executor/interpreter_discovery.py b/lib/ansible/executor/interpreter_discovery.py index e821b9beecb..bfd850410cd 100644 --- a/lib/ansible/executor/interpreter_discovery.py +++ b/lib/ansible/executor/interpreter_discovery.py @@ -58,7 +58,7 @@ def discover_interpreter(action, interpreter_name, discovery_mode, task_vars): is_silent = discovery_mode.endswith('_silent') try: - platform_python_map = C.config.get_config_value('INTERPRETER_PYTHON_DISTRO_MAP', variables=task_vars) + platform_python_map = C.config.get_config_value('_INTERPRETER_PYTHON_DISTRO_MAP', variables=task_vars) bootstrap_python_list = C.config.get_config_value('INTERPRETER_PYTHON_FALLBACK', variables=task_vars) display.vvv(msg=u"Attempting {0} interpreter discovery".format(interpreter_name), host=host)