mirror of
https://github.com/geerlingguy/ansible-role-php.git
synced 2024-11-28 12:45:16 +01:00
Fixes #17: Use proper configuration paths in Debian/Ubuntu.
This commit is contained in:
parent
ee9a827049
commit
8259d152a6
@ -58,7 +58,7 @@ Whether to enable APC. Other APC variables will be ineffective if this is set to
|
|||||||
|
|
||||||
php_apc_enabled_in_ini: false
|
php_apc_enabled_in_ini: false
|
||||||
|
|
||||||
When installing APC, depending on the system and whether running PHP as a webserver module or standalone via `php-fpm`, you might need the line `extension=apc.so` in `apc.ini`. If you need that line added, set this variable to true.
|
When installing APC, depending on the system and whether running PHP as a webserver module or standalone via `php-fpm`, you might need the line `extension=apc.so` in `apc.ini`. If you need that line added (e.g. you're running `php-fpm`), set this variable to true.
|
||||||
|
|
||||||
php_apc_cache_by_default: "1"
|
php_apc_cache_by_default: "1"
|
||||||
php_apc_shm_size: "96M"
|
php_apc_shm_size: "96M"
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
service:
|
service:
|
||||||
name: "{{ php_webserver_daemon }}"
|
name: "{{ php_webserver_daemon }}"
|
||||||
state: restarted
|
state: restarted
|
||||||
|
notify: restart php-fpm
|
||||||
when: php_enable_webserver
|
when: php_enable_webserver
|
||||||
|
|
||||||
- name: restart php-fpm
|
- name: restart php-fpm
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
dest: "{{ php_extension_conf_path }}/{{ php_apc_conf_filename }}"
|
dest: "{{ php_extension_conf_path }}/{{ php_apc_conf_filename }}"
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
|
force: yes
|
||||||
mode: 0644
|
mode: 0644
|
||||||
when: php_enable_apc
|
when: php_enable_apc
|
||||||
notify: restart webserver
|
notify: restart webserver
|
||||||
|
@ -13,6 +13,16 @@
|
|||||||
php_webserver_daemon: "{{ __php_webserver_daemon }}"
|
php_webserver_daemon: "{{ __php_webserver_daemon }}"
|
||||||
when: php_webserver_daemon is not defined
|
when: php_webserver_daemon is not defined
|
||||||
|
|
||||||
|
- name: Define php_conf_path.
|
||||||
|
set_fact:
|
||||||
|
php_conf_path: "{{ __php_conf_path }}"
|
||||||
|
when: php_conf_path is not defined
|
||||||
|
|
||||||
|
- name: Define php_extension_conf_path.
|
||||||
|
set_fact:
|
||||||
|
php_extension_conf_path: "{{ __php_extension_conf_path }}"
|
||||||
|
when: php_extension_conf_path is not defined
|
||||||
|
|
||||||
# Setup/install tasks.
|
# Setup/install tasks.
|
||||||
- include: setup-RedHat.yml
|
- include: setup-RedHat.yml
|
||||||
when: ansible_os_family == 'RedHat'
|
when: ansible_os_family == 'RedHat'
|
||||||
|
@ -1,8 +1,4 @@
|
|||||||
---
|
---
|
||||||
php_conf_path: /etc/php5/apache2
|
|
||||||
php_extension_conf_path: /etc/php5/apache2/conf.d
|
|
||||||
php_apc_conf_filename: 20-apc.ini
|
|
||||||
php_fpm_daemon: php5-fpm
|
|
||||||
__php_packages:
|
__php_packages:
|
||||||
- php5
|
- php5
|
||||||
- libapache2-mod-php5
|
- libapache2-mod-php5
|
||||||
@ -15,3 +11,10 @@ __php_packages:
|
|||||||
- php5-gd
|
- php5-gd
|
||||||
- php-pear
|
- php-pear
|
||||||
__php_webserver_daemon: "apache2"
|
__php_webserver_daemon: "apache2"
|
||||||
|
|
||||||
|
# Vendor-specific configuration paths on Debian/Ubuntu make my brain asplode.
|
||||||
|
__php_conf_path: "{{ '/etc/php5' if php_webserver_daemon and php_webserver_daemon != 'apache2' else '/etc/php5/apache2' }}"
|
||||||
|
__php_extension_conf_path: "{{ __php_conf_path }}/conf.d"
|
||||||
|
|
||||||
|
php_apc_conf_filename: 20-apc.ini
|
||||||
|
php_fpm_daemon: php5-fpm
|
||||||
|
@ -1,8 +1,4 @@
|
|||||||
---
|
---
|
||||||
php_conf_path: /etc
|
|
||||||
php_extension_conf_path: /etc/php.d
|
|
||||||
php_apc_conf_filename: apc.ini
|
|
||||||
php_fpm_daemon: php-fpm
|
|
||||||
__php_packages:
|
__php_packages:
|
||||||
- ImageMagick
|
- ImageMagick
|
||||||
- php
|
- php
|
||||||
@ -20,3 +16,9 @@ __php_packages:
|
|||||||
- php-xml
|
- php-xml
|
||||||
- php-xmlrpc
|
- php-xmlrpc
|
||||||
__php_webserver_daemon: "httpd"
|
__php_webserver_daemon: "httpd"
|
||||||
|
|
||||||
|
__php_conf_path: /etc
|
||||||
|
__php_extension_conf_path: /etc/php.d
|
||||||
|
|
||||||
|
php_apc_conf_filename: apc.ini
|
||||||
|
php_fpm_daemon: php-fpm
|
||||||
|
Loading…
Reference in New Issue
Block a user