Skip to content

Commit

Permalink
Allow php-fpm pool to use custom template
Browse files Browse the repository at this point in the history
  • Loading branch information
spearcrow committed May 20, 2019
1 parent 045a9cd commit 9683427
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ php_fpm_pm_max_spare_servers: '20'
php_fpm_pm_max_requests: '4000' # The number of requests each child process should execute before respawning
php_fpm_pm_process_idle_timeout: 10s # The number of seconds after which an idle process will be killed

php_fpm_pool_template: php_fpm_pool.conf.j2

php_fpm_pools: []
# - name: www
# filename: www.conf
Expand Down
4 changes: 2 additions & 2 deletions tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@

- name: Configure php-fpm pool
template:
src: php_fpm_pool.conf.j2
dest: "{{ php_fpm_pool_conf_path }}/{{ item.filename }}"
src: "{{ php_fpm_pool_template }}"
dest: "{{ php_fpm_pool_conf_path }}/{{ item.filename|d(item.name + '.conf') }}"
validate: "{{ php_fpm_bin }} -t -y %s"
loop: "{{ php_fpm_pools }}"
notify: restart php-fpm
Expand Down

0 comments on commit 9683427

Please sign in to comment.