Option to setup memcached.
This commit is contained in:
parent
9a5d9f3eca
commit
88560b7bdd
|
@ -75,6 +75,11 @@ phpfpm_default_slowlog_timeout: "20s"
|
|||
phpfpm_default_rlimit_files: "4096"
|
||||
phpfpm_default_extensions: ".php"
|
||||
phpfpm_default_context: '/'
|
||||
phpfpm_memcached_session_handler: False
|
||||
phpfpm_local_memcached_session_handler: '{{ phpfpm_memcached_session_handler }}'
|
||||
# Separate with , if there is more than one host
|
||||
phpfpm_memcached_hosts: 'localhost:11211'
|
||||
# Those ones are ignored is phpfpm_memcached_session_handler is True
|
||||
phpfpm_default_session_handler: 'files'
|
||||
phpfpm_default_session_prefix: '/var/lib/php'
|
||||
phpfpm_default_session_dir: '{{ phpfpm_default_session_prefix }}/sessions'
|
||||
|
|
|
@ -13,4 +13,10 @@ galaxy_info:
|
|||
- php
|
||||
- php-fpm
|
||||
|
||||
dependencies: []
|
||||
dependencies:
|
||||
- src: git+https://gitea-s2i2s.isti.cnr.it/ISTI-ansible-roles/ansible-role-memcached.git
|
||||
version: master
|
||||
name: memcached
|
||||
state: latest
|
||||
when: phpfpm_local_memcached_session_handler
|
||||
|
||||
|
|
|
@ -282,6 +282,10 @@ php_admin_value[memory_limit] = {{ item.memory_limit | default(phpfpm_default_me
|
|||
php_admin_value[upload_max_filesize] = {{ item.upload_max_filesize | default(phpfpm_default_default_upload_maxsize) }}
|
||||
php_admin_value[post_max_size] = {{ item.post_max_filesize | default(phpfpm_default_post_max_filesize) }}
|
||||
php_admin_value[upload_tmp_dir] = {{ item.upload_tmp_dir | default(phpfpm_default_tmp_dir) }}
|
||||
{% if phpfpm_memcached_session_handler %}
|
||||
php_value[session.save_handler] = 'memcached'
|
||||
php_value[session.save_path] = '{{ phpfpm_memcached_hosts }}'
|
||||
{% else %}
|
||||
; Set session path to a directory owned by process user
|
||||
php_value[session.save_handler] = '{{ item.session_save_handler | default('files') }}'
|
||||
{% if phpfpm_session_prefix is defined %}
|
||||
|
@ -289,6 +293,7 @@ php_value[session.save_path] = '{{ phpfpm_session_prefix }}/{{ item.pool_name }}
|
|||
{% else %}
|
||||
php_value[session.save_path] = '{{ phpfpm_default_session_dir }}'
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% if item.define_custom_variables is defined and item.define_custom_variables %}
|
||||
{% for php_var in phpfpm_php_variables %}
|
||||
php_value[{{ php_var.prop }}] = {{ php_var.value }}
|
||||
|
|
Loading…
Reference in New Issue