@@ -2,6 +2,10 @@ config ANSIBLE_CFG_CALLBACK_PLUGIN_SET_BY_CLI
22 bool
33 default $(shell, scripts/check-cli-set-var.sh ANSIBLE_CFG_CALLBACK_PLUGIN)
44
5+ config ANSIBLE_CFG_INTERPRETER_PYTHON_SET_BY_CLI
6+ bool
7+ default $(shell, scripts/check-cli-set-var.sh ANSIBLE_CFG_INTERPRETER_PYTHON)
8+
59menu "Ansible Callback Plugin Configuration"
610choice
711 prompt "Ansible Callback Plugin"
@@ -108,6 +112,66 @@ config ANSIBLE_CFG_DEPRECATION_WARNINGS
108112 Toggle to control the showing of deprecation warnings
109113 https://docs.ansible.com/ansible/latest/reference_appendices/config.html#deprecation-warnings
110114
115+ menu "Ansible Python Interpreter"
116+ choice
117+ prompt "Ansible Python Interpreter"
118+ default ANSIBLE_CFG_INTERPRETER_PYTHON_AUTO if !ANSIBLE_CFG_INTERPRETER_PYTHON_SET_BY_CLI
119+ default ANSIBLE_CFG_INTERPRETER_PYTHON_CUSTOM if ANSIBLE_CFG_INTERPRETER_PYTHON_SET_BY_CLI
120+
121+ config ANSIBLE_CFG_INTERPRETER_PYTHON_AUTO
122+ bool "Ansible Python Interpreter: Auto"
123+ help
124+ https://docs.ansible.com/ansible/latest/reference_appendices/interpreter_discovery.html#interpreter-discovery
125+
126+ config ANSIBLE_CFG_INTERPRETER_PYTHON_AUTO_LEGACY
127+ bool "Ansible Python Interpreter: Auto Legacy"
128+ help
129+ https://docs.ansible.com/ansible/latest/reference_appendices/interpreter_discovery.html#interpreter-discovery
130+
131+ config ANSIBLE_CFG_INTERPRETER_PYTHON_AUTO_LEGACY_CLIENT
132+ bool "Ansible Python Interpreter: Auto Legacy Client"
133+ help
134+ https://docs.ansible.com/ansible/latest/reference_appendices/interpreter_discovery.html#interpreter-discovery
135+
136+ config ANSIBLE_CFG_INTERPRETER_PYTHON_AUTO_SILENT
137+ bool "Ansible Python Interpreter: Auto Silent"
138+ help
139+ https://docs.ansible.com/ansible/latest/reference_appendices/interpreter_discovery.html#interpreter-discovery
140+
141+ config ANSIBLE_CFG_INTERPRETER_PYTHON_CUSTOM
142+ bool "Ansible Python Interpreter: Custom"
143+ help
144+ https://docs.ansible.com/ansible/latest/reference_appendices/interpreter_discovery.html#interpreter-discovery
145+
146+ endchoice
147+
148+ if ANSIBLE_CFG_INTERPRETER_PYTHON_CUSTOM
149+
150+ config ANSIBLE_CFG_INTERPRETER_PYTHON_CUSTOM_NAME
151+ string "Custom Ansible Python Interpreter Name"
152+ default $(shell, ./scripts/append-makefile-vars.sh $(ANSIBLE_CFG_INTERPRETER_PYTHON)) if ANSIBLE_CFG_INTERPRETER_PYTHON_SET_BY_CLI
153+ default "/usr/bin/python3" if !ANSIBLE_CFG_INTERPRETER_PYTHON_SET_BY_CLI
154+
155+ endif # ANSIBLE_CFG_INTERPRETER_PYTHON_CUSTOM
156+
157+ config ANSIBLE_CFG_INTERPRETER_PYTHON_STRING
158+ string
159+ output yaml
160+ default "auto" if ANSIBLE_CFG_INTERPRETER_PYTHON_AUTO
161+ default "auto_legacy" if ANSIBLE_CFG_INTERPRETER_PYTHON_AUTO_LEGACY
162+ default "auto_legacy_client" if ANSIBLE_CFG_INTERPRETER_PYTHON_AUTO_LEGACY_CLIENT
163+ default "auto_silent" if ANSIBLE_CFG_INTERPRETER_PYTHON_AUTO_SILENT
164+ default ANSIBLE_CFG_INTERPRETER_PYTHON_CUSTOM_NAME if ANSIBLE_CFG_INTERPRETER_PYTHON_CUSTOM
165+ help
166+ Path to the Python interpreter to be used for module execution on remote targets,
167+ or an automatic discovery mode.
168+ https://docs.ansible.com/ansible/latest/reference_appendices/python_3_support.html#using-python-3-on-the-managed-machines-with-commands-and-playbooks
169+ https://docs.ansible.com/ansible/latest/reference_appendices/interpreter_discovery.html#interpreter-discovery
170+ https://docs.ansible.com/ansible/latest/reference_appendices/config.html#interpreter-python
171+ https://docs.ansible.com/ansible/latest/reference_appendices/config.html#envvar-ANSIBLE_PYTHON_INTERPRETER
172+
173+ endmenu
174+
111175if DISTRO_OPENSUSE
112176
113177config ANSIBLE_CFG_RECONNECTION_RETRIES
0 commit comments