ansible-role-php-versions/tasks/main.yml
Sergey Gripinskiy 5b3cf3f760
fix: Unusable php_packages variable
It was impossible to set php_packages variable from a playbook when
using geerlingguy.php with geerlingguy.php-versions roles.
2020-11-22 14:26:08 +03:00

35 lines
1.2 KiB
YAML

---
- name: Include OS-specific variables.
include_vars: "{{ item }}"
with_fileglob:
- "{{ role_path }}/vars/{{ ansible_os_family }}.yml"
- "{{ role_path }}/vars/{{ ansible_os_family }}-php{{ php_version }}.yml"
- name: Define PHP variables.
set_fact: "{{ item.key }}={{ lookup('vars', item.value) }}"
when:
- vars[item.key] is undefined
- vars[item.value] is defined
with_dict:
php_conf_paths: __php_conf_paths
php_extension_conf_paths: __php_extension_conf_paths
php_fpm_daemon: __php_fpm_daemon
php_fpm_conf_path: __php_fpm_conf_path
php_fpm_pool_conf_path: __php_fpm_pool_conf_path
php_mysql_package: __php_mysql_package
php_redis_package: __php_redis_package
php_memcached_package: __php_memcached_package
php_pgsql_package: __php_pgsql_package
php_tideways_module_path: __php_tideways_module_path
php_uploadprogress_module_path: __php_uploadprogress_module_path
php_xdebug_module_path: __php_xdebug_module_path
php_xhprof_module_path: __php_xhprof_module_path
php_packages: __php_packages
- name: Define php_install_recommends variable.
set_fact:
php_install_recommends: "{{ php_versions_install_recommends }}"
# Setup tasks.
- include_tasks: "setup-{{ ansible_os_family }}.yml"