No description
Find a file
2018-12-01 08:04:25 +01:00
defaults test: add yamllint 2018-11-30 18:59:40 +01:00
files first version 2018-08-12 10:47:38 +02:00
handlers test: add yamllint 2018-11-30 18:59:40 +01:00
meta break: change with_items to loop 2018-12-01 08:00:35 +01:00
tasks break: change with_items to loop 2018-12-01 08:00:35 +01:00
templates fix: group permission 2018-09-25 19:34:13 +02:00
test/integration test: add yamllint 2018-11-30 18:59:40 +01:00
.gitignore first version 2018-08-12 10:47:38 +02:00
.kitchen.yml test: add test with ansible 2.7 2018-12-01 07:58:04 +01:00
.rubocop.yml test: add yamllint 2018-11-30 18:59:40 +01:00
.travis.yml break: change with_items to loop 2018-12-01 08:00:35 +01:00
.yamllint test: add yamllint 2018-11-30 18:59:40 +01:00
CHANGELOG.md release: version 1.2.0 2018-12-01 08:04:25 +01:00
Gemfile first version 2018-08-12 10:47:38 +02:00
Gemfile.lock first version 2018-08-12 10:47:38 +02:00
LICENSE first version 2018-08-12 10:47:38 +02:00
README.md release: version 1.2.0 2018-12-01 08:04:25 +01:00

Ansible role: PHP FPM

Version Build Status License

Install and configure PHP FPM

Requirements

  • Ansible >= 2.5
  • Debian Stretch

Role variables

  • phpfpm_version - the php version to use (default: 7.0)
  • phpfpm_dir_log - directory with the phpfpm logs (default: /var/log/phpfpm)
  • phpfpm_packages - array with the additionnal php packages to install
  • phpfpm_pools - array with the phpfpm pools
  - name: myappli
    user: www-myappli
    php_config:
      admin_value:
        opcache.enable: 1
        opcache.enable_cli: 1
  - name: otherappli
    user: www-otherappli
    ping_path: /ping-test

Default variables for all pools

See php pool directives documentation

  • phpfpm_ping_path - (default: /ping)
  • phpfpm_ping_response - (default: pong)
  • phpfpm_pm - (default: ondemand)
  • phpfpm_pm_max_children - (default: 16)
  • phpfpm_pm_start_servers - (default: 4)
  • phpfpm_pm_min_spare_servers - (default: 2)
  • phpfpm_pm_max_spare_servers - (default: 8)
  • phpfpm_pm_max_requests - (default: 500)
  • phpfpm_pm_process_idle_timeout - (default: 10)
  • phpfpm_pm_status_path - (default: /status)
  • phpfpm_request_slowlog_timeout - (default: 10)
  • phpfpm_security_limit_extensions - (default: .php)

How to use

- hosts: server
  roles:
    - phpfpm

Development

Tests with docker

  • install docker
  • install ruby
  • install bundler gem install bundler
  • install dependencies bundle install
  • run the tests kitchen test

License

Copyright (c) 2018 Adrien Waksberg

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.