2014-03-01 03:39:35 +01:00
|
|
|
---
|
2014-04-23 18:26:37 +02:00
|
|
|
- name: Include OS-specific variables.
|
|
|
|
include_vars: "{{ ansible_os_family }}.yml"
|
|
|
|
|
2014-05-15 05:10:31 +02:00
|
|
|
- name: Ensure PHP packages are installed (RedHat).
|
2014-04-23 18:26:37 +02:00
|
|
|
yum: >
|
|
|
|
name={{ item }}
|
|
|
|
state=installed
|
|
|
|
enablerepo={{ php_enablerepo }}
|
|
|
|
with_items: php_packages
|
2014-05-03 05:27:28 +02:00
|
|
|
notify: restart webserver
|
2014-05-15 05:10:31 +02:00
|
|
|
when: ansible_os_family == 'RedHat'
|
2014-04-23 18:26:37 +02:00
|
|
|
|
|
|
|
- name: Ensure PHP packages are installed (Debian).
|
|
|
|
apt: >
|
|
|
|
name={{ item }}
|
|
|
|
state=installed
|
2014-03-01 03:39:35 +01:00
|
|
|
with_items: php_packages
|
2014-05-03 05:27:28 +02:00
|
|
|
notify: restart webserver
|
2014-04-23 18:26:37 +02:00
|
|
|
when: ansible_os_family == 'Debian'
|
2014-03-01 03:39:35 +01:00
|
|
|
|
|
|
|
- name: Place PHP configuration files in place.
|
2014-04-23 18:26:37 +02:00
|
|
|
template: >
|
|
|
|
src={{ item.src }}
|
|
|
|
dest={{ item.dest }}
|
|
|
|
owner=root group=root mode=644
|
2014-03-01 03:39:35 +01:00
|
|
|
with_items:
|
2014-04-23 18:26:37 +02:00
|
|
|
- { src: php.ini.j2, dest: "{{ php_conf_path }}/php.ini" }
|
|
|
|
- { src: apc.ini.j2, dest: "{{ php_extension_conf_path }}/{{ php_apc_conf_filename }}" }
|
2014-05-03 05:27:28 +02:00
|
|
|
notify: restart webserver
|
|
|
|
|
|
|
|
- name: Ensure php-fpm is started and enabled at boot (if configured).
|
|
|
|
service: name=php-fpm state=started enabled=yes
|
|
|
|
when: php_enable_php_fpm
|