ansible-role-php/tasks/main.yml
2014-04-23 11:26:37 -05:00

31 lines
846 B
YAML

---
- name: Include OS-specific variables.
include_vars: "{{ ansible_os_family }}.yml"
- name: Ensure PHP packages are installed (RedHat).
yum: >
name={{ item }}
state=installed
enablerepo={{ php_enablerepo }}
with_items: php_packages
notify: restart apache
when: ansible_os_family == 'RedHat'
- name: Ensure PHP packages are installed (Debian).
apt: >
name={{ item }}
state=installed
with_items: php_packages
notify: restart apache
when: ansible_os_family == 'Debian'
- name: Place PHP configuration files in place.
template: >
src={{ item.src }}
dest={{ item.dest }}
owner=root group=root mode=644
with_items:
- { src: php.ini.j2, dest: "{{ php_conf_path }}/php.ini" }
- { src: apc.ini.j2, dest: "{{ php_extension_conf_path }}/{{ php_apc_conf_filename }}" }
notify: restart apache