aboutsummaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
authorStonewall Jackson <stonewall@sacredheartsc.com>2023-02-16 19:49:05 -0500
committerStonewall Jackson <stonewall@sacredheartsc.com>2023-02-16 19:49:05 -0500
commitac9fa26cadf958798c5b8c9060abc93176533276 (patch)
tree106604cb6b8ad8647594c7559c8a9157f9d1a266 /roles
parent880e579ddc3ca141e79e736e40c0b831bb9a9111 (diff)
downloadselfhosted-ac9fa26cadf958798c5b8c9060abc93176533276.tar.gz
selfhosted-ac9fa26cadf958798c5b8c9060abc93176533276.zip
php: add docs
Diffstat (limited to 'roles')
-rw-r--r--roles/php/README.md52
-rw-r--r--roles/php/defaults/main.yml1
2 files changed, 52 insertions, 1 deletions
diff --git a/roles/php/README.md b/roles/php/README.md
new file mode 100644
index 0000000..b109a58
--- /dev/null
+++ b/roles/php/README.md
@@ -0,0 +1,52 @@
+PHP
+===
+
+Description
+-----------
+
+The `php` role installs PHP and configures the PHP-FPM daemon for use with the
+Apache webserver.
+
+This role currently limited to a single PHP-FPM pool.
+
+Variables
+---------
+
+This role **accepts** the following variables:
+
+Variable | Default | Description
+----------------------------|------------------|------------
+`php_post_max_size` | `8M` | Maximum HTTP POST size
+`php_upload_max_filesize` | `25M` | Maximum upload filesize
+`php_max_file_uploads` | 20 | Maximum simultaneous uploads
+`php_timezone` | `{{ timezone }}` | PHP timezone
+`php_fpm_user` | `apache` | Unix user for FPM process
+`php_fpm_group` | `apache` | Unix group for FPM process
+`php_fpm_max_children` | 50 | Maximum number of concurrent PHP requests
+`php_fpm_start_servers` | 5 | Initial number of FPM threads
+`php_fpm_min_spare_servers` | 5 | Minimum number of idle FPM threads
+`php_fpm_max_spare_servers` | 35 | Maximum number of idle FPM threads
+`php_fpm_flags` | `{}` | Dictionary of boolean PHP configuration directives
+`php_fpm_admin_flags` | `{}` | Dictionary of boolean PHP configuration directives (non-overridable)
+`php_fpm_values` | `{}` | Dictionary of PHP configuration directives
+`php_fpm_admin_values` | `{}` | Dictionary of PHP configuration directives (non-overridable)
+`php_fpm_environment` | `{}` | Dictionary of environment variables for PHP process
+
+Usage
+-----
+
+Example playbook:
+
+````yaml
+- name: configure php
+ hosts: webservers
+ roles:
+ - role: php
+ vars:
+ php_fpm_environment:
+ GSS_USE_PROXY: 'yes'
+ php_fpm_admin_flags:
+ output_buffering: no
+ always_populate_raw_post_data: no
+ mbstring.func_overload: no
+````
diff --git a/roles/php/defaults/main.yml b/roles/php/defaults/main.yml
index 45c0138..eea8eb9 100644
--- a/roles/php/defaults/main.yml
+++ b/roles/php/defaults/main.yml
@@ -3,7 +3,6 @@ php_upload_max_filesize: 25M
php_max_file_uploads: 20
php_timezone: '{{ timezone }}'
-php_fpm_pool: www
php_fpm_user: apache
php_fpm_group: apache
php_fpm_max_children: 50