nishiki.phpfpm

Ansible Role: PHP FPM

Version Build Status License

This role installs and sets up PHP FPM.

Requirements

  • Ansible version 2.5 or newer
  • Debian Stretch

Role Variables

  • phpfpm_version - the PHP version to install (default is 7.0)
  • phpfpm_dir_log - directory for PHP FPM logs (default is /var/log/phpfpm)
  • phpfpm_packages - list of additional PHP packages to install
  • phpfpm_pools - list of PHP FPM pools

Example of pool configuration:

  - 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

Refer to the 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

Running Tests with Docker

  • Install Docker
  • Install Ruby
  • Install Bundler using gem install bundler
  • Install dependencies with bundle install
  • Run the tests using kitchen test

License

Copyright (c) 2018 Adrien Waksberg

This software is licensed under the Apache License, Version 2.0 (the "License");
you cannot use this file unless you comply with the License.
You can find a copy of the License at

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

Unless required by law or agreement, software distributed under this License is provided "AS IS" with no warranties or conditions.
See the License for more information about permissions and limitations.
Informazioni sul progetto

Install and configure PHP-FPM

Installa
ansible-galaxy install nishiki.phpfpm
Licenza
apache-2.0
Download
20.6k
Proprietario