You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
870 B
21 lines
870 B
---
|
|
- name: Deploy httpd configuration
|
|
template: src=httpd.conf.j2 dest=/etc/httpd/ansible_conf.d/10-{{ app_id }}.conf
|
|
notify: reload httpd
|
|
|
|
- name: Deploy PHP config
|
|
template: src=php.conf.j2 dest={{ httpd_php_versions[php_version].conf_path }}/php-fpm.d/{{ app_id }}.conf
|
|
when: php_fpm_pool is not defined or php_fpm_pool == ''
|
|
notify: restart php-fpm
|
|
|
|
- name: Remove PHP config from other versions
|
|
file: path={{ httpd_php_versions[item].conf_path }}/php-fpm.d/{{ app_id }}.conf state=absent
|
|
with_items: "{{ httpd_php_versions.keys() | list | difference([ php_version ]) }}"
|
|
notify: restart php-fpm
|
|
|
|
- name: Remove PHP config (using a custom pool)
|
|
file: path={{ httpd_php_versions[item].conf_path }}/php-fpm.d/{{ app_id }}.conf state=absent
|
|
with_items: "{{ httpd_php_versions.keys() | list }}"
|
|
when: php_fpm_pool != ''
|
|
notify: restart php-fpm
|
|
|
|
|