瀏覽代碼

Change the python interpreter discovery mode.

Current default mode for the python interpreter discover inansible 2.8 is
auto_legacy. This patch changes the mode to auto, the biggest difference
respecting auto_legacy is 'If no entry is found, or the listed Python is
not present on the target host, searches a list of common Python interpreter
paths and uses the first one found' [0].
Currently, it has been observed some issues with the
discovered_python_interpreter fact not getting updated on specific scenarios
(for example, when upgrading the node from RHEL7 to RHEL8). This change is
expected to improve this situation.

[0] - https://docs.ansible.com/ansible/latest/reference_appendices/interpreter_discovery.html#
Related-Bug: #1856313
Change-Id: Iaef4839bb15ec398537b5c57a441c8e28a552bc0
(cherry picked from commit 6b4f47dd42)
(cherry picked from commit 62d24f121e)
changes/39/699439/2
Jose Luis Franco Arza Jose Luis Franco 3 月之前
父節點
當前提交
0e559fc7cb
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. +3
    -0
      tripleo_common/actions/ansible.py

+ 3
- 0
tripleo_common/actions/ansible.py 查看文件

@@ -96,6 +96,9 @@ def write_default_ansible_cfg(work_dir,
config.set('defaults', 'fact_caching_connection',
'/var/lib/mistral/ansible_fact_cache')

# Set the interpreter discovery to auto mode.
config.set('defaults', 'interpreter_python', 'auto')

# Expire facts in the fact cache after 7200s (2h)
config.set('defaults', 'fact_caching_timeout', '7200')



Loading…
取消
儲存