Issue #42: Attempt to fix 'Define PHP variables' task for Ansible 2.9.0.

This commit is contained in:
Jeff Geerling 2019-11-01 10:24:19 -05:00
parent c55cd1e975
commit eb6825a532

View File

@ -6,7 +6,7 @@
- "{{ role_path }}/vars/{{ ansible_os_family }}-php{{ php_version }}.yml"
- name: Define PHP variables.
set_fact: "{{ item.key }}={{ hostvars[inventory_hostname][item.value] }}"
set_fact: "{{ item.key }}={{ lookup('vars', item.value) }}"
when:
- hostvars[inventory_hostname][item.key] is undefined
- hostvars[inventory_hostname][item.value] is defined