GithubHelp home page GithubHelp logo

ansible-php-fpm's Introduction

Build Status Ansible Galaxy

php-fpm

This role installs and configures the php-fpm interpreter.

Requirements

This role requires Ansible 1.4 or higher and tested platforms are listed in the metadata file.

Role Variables

The role uses the following variables:

  • php_fpm_version: The version of php to be installed. Defaults to "5.6". Note this must include both the major version number and the minor version number/ mantissa.
  • php_fpm_pools: The list a pools for php-fpm, each pools is a hash with a name entry (used for filename), all the other entries in the hash are pool directives (see http://php.net/manual/en/install.fpm.configuration.php).
  • php_fpm_pool_defaults: A list of default directives used for all php-fpm pools (see http://php.net/manual/en/install.fpm.configuration.php).
  • php_fpm_apt_packages: The list of packages to be installed by the apt module. Defaults to [php5-fpm] or [php-fpm] depending on the php_fpm_version specified.
  • php_fpm_yum_packages: The list of packages to be installed by the yum module, defaults to [php-fpm].
  • php_fpm_ini: Customization for php-fpm's php.ini as a list of options, each option is a hash using the following structure:
    • option: The name of the option.
    • value: The string value to be associated with the option.
    • section: Section name in INI file.
  • php_fpm_config: Customization for php-fpm's configuration file as a list of options.
  • php_fpm_default_pool:
    • delete: Set to a True value to delete the default pool.
    • name: The filename the default pool configuration file.

Example configuration

- role: php-fpm
  php_fpm_version: 7.0
  php_fpm_pool_defaults:
    pm: dynamic
    pm.max_children: 5
    pm.start_servers: 2
    pm.min_spare_servers: 1
    pm.max_spare_servers: 3
  php_fpm_pools:
   - name: foo
     user: www-data
     group: www-data
     listen: 8000
     chdir: /
   - name: bar
     user: www-data
     group: www-data
     listen: 8001
   php_fpm_ini:
   # PHP section directives
   - option: "engine"
     section: "PHP"
     value: "1"
   - option: "error_reporting"
     section: "PHP"
     value: "E_ALL & ~E_DEPRECATED & ~E_STRICT"
   - option: "date.timezone"
     section: "PHP"
     value: "Europe/Berlin"
   # soap section directives
   - option: "soap.wsdl_cache_dir"
     section: "soap"
     value: "/tmp"
   # Pdo_mysql section directives
   - option: "pdo_mysql.cache_size"
     section: "Pdo_mysql"
     value: "2000"
   php_fpm_config:
   - option: "log_level"
     section: "global"
     value: "notice"
   - option: "syslog.facility"
     section: "global"
     value: "daemon"

Example usage

---
# file: task.yml
- hosts: all
  roles:
    - nbz4live.php-fpm
    - {
        role: nbz4live.php-fpm,
        php_fpm_pools:[
          {name: foo, user: www-data, group: www-data, listen: 8000, chdir: /}
        ]
      }
    - role: php-fpm
        php_fpm_pools:
          - name: bar
            user: www-data
            group: www-data
            listen: 9000
            chdir: /

License

BSD

Author Information

ansible-php-fpm's People

Contributors

ahelal avatar bitdeli-chef avatar italolelis avatar j4m3s avatar kieranajp avatar nbz4live avatar sunsongxp avatar vgarvardt avatar zeelax avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.