Add ability to ignore webserver entirely.

This commit is contained in:
Jeff Geerling 2014-05-24 22:08:20 -05:00
parent 35e35e023d
commit d3b619e07f
3 changed files with 6 additions and 0 deletions

View File

@ -33,6 +33,10 @@ Explicitly set PHP's date timezone system-wide.
A list of the PHP packages to install (OS-specific by default). You'll likely want to install common packages like `php`, `php-cli`, `php-devel` and `php-pdo`, and you can add in whatever other packages you'd like (for example, `php-gd` for image manipulation, or `php-ldap` if you need to connect to an LDAP server for authentication).
php_enable_webserver: true
If your usage of PHP is tied to a web server (e.g. Apache or Nginx), leave this default value. If you are using PHP server-side or to run some small application, set this value to `false` so this role doesn't attempt to interact with a web server.
php_webserver_daemon: "httpd"
The default values for the HTTP server deamon are `httpd` (used by Apache) for RedHat/CentOS, or `apache2` (also used by Apache) for Debian/Ubuntu. If you are running another webserver (for example, `nginx`), change this value to the name of the daemon under which the webserver runs.

View File

@ -8,6 +8,7 @@ php_apc_cache_by_default: "1"
php_apc_shm_size: "96M"
php_date_timezone: "America/Chicago"
php_packages: []
php_enable_webserver: true
php_webserver_daemon: "httpd"
php_enable_php_fpm: false

View File

@ -1,6 +1,7 @@
---
- name: restart webserver
service: "name={{ php_webserver_daemon }} state=restarted"
when: php_enable_webserver
- name: restart php-fpm
service: "name=php-fpm state=restarted"