diff --git a/common/generate-config-tasks.yaml b/common/generate-config-tasks.yaml index 3c7a88f5da..4b8524c112 100644 --- a/common/generate-config-tasks.yaml +++ b/common/generate-config-tasks.yaml @@ -1,13 +1,13 @@ - name: Gather facts needed by role if necessary setup: gather_subset: "!min,python" - when: ansible_python is not defined + when: ansible_facts['python'] is not defined tags: - container_config_tasks - name: set python_cmd if necessary set_fact: - python_cmd: "python{{ ansible_python.version.major }}" + python_cmd: "python{{ ansible_facts.python.version.major }}" cacheable: true when: python_cmd is not defined tags: diff --git a/common/host-container-puppet-tasks.yaml b/common/host-container-puppet-tasks.yaml index f6b13c1344..059b0fbbd5 100644 --- a/common/host-container-puppet-tasks.yaml +++ b/common/host-container-puppet-tasks.yaml @@ -12,13 +12,13 @@ - name: Gather ansible facts if necessary setup: gather_subset: "!min,python" - when: ansible_python is not defined + when: ansible_facts['python'] is not defined tags: - container_config_tasks - name: Set python_cmd if necessary set_fact: - python_cmd: "python{{ ansible_python.version.major }}" + python_cmd: "python{{ ansible_facts.python.version.major }}" cacheable: true when: python_cmd is not defined tags: