library/roles/dnet_user_services_perms/tasks/dnet-users-data-dirs.yml: Specify the permissions.
This commit is contained in:
parent
9e5653f85d
commit
1cc6b453ea
|
@ -13,9 +13,9 @@ dnet_log_directories:
|
|||
|
||||
# Define the following if you want some directories readable and writable by the dnet group but outside the dnet app data dirs
|
||||
#dnet_users_data_directories:
|
||||
# - { name: '/data/1', create: True }
|
||||
# - { name: '/data/2', create: False, file: False }
|
||||
# - { name: '/data/bah', create: False, file: True }
|
||||
# - { name: '/data/1', perms: 0755, create: True }
|
||||
# - { name: '/data/2', create: False, perms: 0755, file: False }
|
||||
# - { name: '/data/bah', create: False, perms: 0644, file: True }
|
||||
|
||||
# Define the following array when you want to add commands to the sudoers file
|
||||
#dnet_sudo_commands:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
- name: Create the users dnet data dirs
|
||||
file: name={{ item.name }} state=directory owner=root group={{ dnet_group }} mode=0750
|
||||
file: name={{ item.name }} state=directory owner=root group={{ dnet_group }} mode={{ item.perms }}
|
||||
with_items: dnet_users_data_directories
|
||||
when: item.create and not item.file
|
||||
tags: [ 'dnet', 'users' ]
|
||||
|
|
|
@ -57,11 +57,20 @@ phpfpm_default_context: '/'
|
|||
phpfpm_default_session_handler: 'files'
|
||||
phpfpm_default_session_prefix: '/var/lib/php5'
|
||||
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_allow_failover: 1
|
||||
memcache_session_redundancy: 3
|
||||
|
||||
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 }}' }
|
||||
- { 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 }}' }
|
||||
|
|
|
@ -14,17 +14,10 @@
|
|||
- php
|
||||
- php_ini
|
||||
|
||||
- name: Activate the memcache redundancy if we use it
|
||||
ini_file: dest={{ phpfpm_base_dir }}/php.ini section=memcache option=memcache.allow_failover value={{ memcache_session_allow_failover }}
|
||||
when: phpfpm_use_memcache_redundancy_sessions
|
||||
notify: Reload php-fpm
|
||||
tags:
|
||||
- php
|
||||
- php_ini
|
||||
|
||||
- name: Set the memcache redundancy servers
|
||||
ini_file: dest={{ phpfpm_base_dir }}/php.ini section=memcache option=memcache.session_redundancy value={{ memcache_session_redundancy }}
|
||||
- name: Activate the memcache sessions support and redundancy if needed
|
||||
action: configfile path={{ phpfpm_base_dir }}/conf.d/20-memcache.ini key={{ item.prop }} value='{{ item.value }}'
|
||||
when: phpfpm_use_memcache_redundancy_sessions
|
||||
with_items: memcache_session
|
||||
notify: Reload php-fpm
|
||||
tags:
|
||||
- php
|
||||
|
|
|
@ -302,3 +302,8 @@ php_value[session.save_path] = '{{ phpfpm_session_save_path }}'
|
|||
php_value[session.save_path] = '{{ phpfpm_default_session_prefix }}/{{ item.pool_name }}'
|
||||
{% 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 }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in New Issue