ansible-roles/php-fpm/defaults/main.yml

89 lines
3.9 KiB
YAML
Raw Normal View History

---
#
# IMPORTANT: the template will be used on a task that refers 'phpfpm_pools' inside a 'with_items' loop. So
# the variables into the template are all 'item.XXX'
#
phpfpm_service_enabled: True
phpfpm_remove_php_module: True
php_from_ppa: False
php_ppa: ppa:ondrej/php
php_version: 5
phpfpm_base_dir: '/etc/php{{ php_version }}/fpm'
phpfpm_cli_dir: '/etc/php{{ php_version }}/cli'
# Change to when using the PPA
# phpfpm_base_dir: '/etc/php/{{ php_version }}/fpm'
php_fpm_packages:
- 'php{{ php_version }}-fpm'
#php_global_settings:
# - { option: '', value: '', state: '' }
#php_cli_global_settings:
# - { option: '', value: '', state: '' }
# Main confign file settings
# It can be 'syslog'
phpfpm_logdir: /var/log/php-fpm
phpfpm_error_logfile: '/var/log/php{{ php_version }}-fpm.log'
phpfpm_syslog_facility: daemon
phpfpm_syslog_ident: php-fpm
phpfpm_log_level: notice
phpfpm_emergency_restart_threshold: 5
phpfpm_emergency_restart_interval: 2m
phpfpm_process_control_timeout: 10s
phpfpm_set_process_max: False
phpfpm_process_max: 256
phpfpm_set_event_mechanism: False
phpfpm_event_mechanism: epoll
# Pools settings
phpfpm_default_pool_name: "php-fpm"
phpfpm_remove_default_pool: True
phpfpm_use_default_template: True
phpfpm_create_users: True
phpfpm_default_user: php-fpm
phpfpm_default_group: php-fpm
phpfpm_default_listen: "127.0.0.1:9000"
phpfpm_default_allowed_clients: "127.0.0.1"
phpfpm_default_pm: "dynamic"
phpfpm_default_pm_max_children: "50"
phpfpm_default_pm_start_servers: "8"
phpfpm_default_pm_min_spare_servers: "5"
phpfpm_default_pm_max_spare_servers: "12"
phpfpm_default_pm_max_requests: "10000"
phpfpm_default_pm_status_enabled: False
phpfpm_default_pm_status_path: "/status"
phpfpm_default_ping_enabled: False
phpfpm_default_ping_path: "/ping"
phpfpm_default_ping_response: '{{ phpfpm_default_pool_name }}'
phpfpm_default_display_errors: "off"
phpfpm_default_log_errors: "on"
phpfpm_default_memory_limit: "64M"
phpfpm_default_request_terminate_timeout: "240s"
phpfpm_default_slowlog_timeout: "20s"
phpfpm_default_rlimit_files: "4096"
phpfpm_default_extensions: ".php"
phpfpm_default_context: '/'
phpfpm_default_session_handler: 'files'
phpfpm_default_session_prefix: '/var/lib/php'
phpfpm_session_prefix: '{{ phpfpm_default_session_prefix }}'
phpfpm_default_define_custom_variables: False
phpfpm_use_memcache_redundancy_sessions: False
phpfpm_use_memcached_redundancy_sessions: False
memcache_session:
- { prop: 'memcache.allow_failover', value: 1 }
- { prop: 'memcache.session_redundancy', value: 3 }
- { prop: 'memcache.hash_strategy', value: 'standard' }
- { prop: 'memcache.max_failover_attempts', value: '20' }
phpfpm_php_variables:
- { prop: 'session.gc_maxlifetime', value: 1440 }
- { prop: 'session.cache_expire', value: 180 }
phpfpm_pools:
- { pool_name: '{{ phpfpm_default_pool_name }}', app_context: '{{ phpfpm_default_context }}', user: '{{ phpfpm_default_user }}', group: '{{ phpfpm_default_group }}', listen: '{{ phpfpm_default_listen }}', allowed_clients: '{{ phpfpm_default_allowed_clients }}', pm: '{{ phpfpm_default_pm }}', pm_max_children: '{{ phpfpm_default_pm_max_children }}', pm_start_servers: '{{ phpfpm_default_pm_start_servers }}', pm_min_spare: '{{ phpfpm_default_pm_min_spare_servers }}', pm_max_spare: '{{ phpfpm_default_pm_max_spare_servers }}', pm_max_requests: '{{ phpfpm_default_pm_max_requests }}', pm_status_enabled: '{{ phpfpm_default_pm_status_enabled }}', pm_status_path: '{{ phpfpm_default_pm_status_path }}', ping_enabled: '{{ phpfpm_default_ping_enabled }}', ping_path: '{{ phpfpm_default_ping_path }}', ping_response: '{{ phpfpm_default_ping_response }}', display_errors: '{{ phpfpm_default_display_errors }}', log_errors: '{{ phpfpm_default_log_errors }}', memory_limit: '{{ phpfpm_default_memory_limit }}', slowlog_timeout: '{{ phpfpm_default_slowlog_timeout }}', rlimit_files: '{{ phpfpm_default_rlimit_files }}', php_extensions: '{{ phpfpm_default_extensions }}', define_custom_variables: '{{ phpfpm_default_define_custom_variables }}' }