Git Product home page Git Product logo

ansible-role-php-fpm's Introduction

Ansible Role: php-fpm

Build Status Ansible Galaxy

The php-fpm role allows you to create dedicated instances running under a specified user/group.

This role performs the following tasks:

  • create /home/{{ user }}/etc/php5/fpm/php.ini
  • create /home/{{ user }}/etc/php5/fpm/php-fpm.conf
  • create /home/{{ user }}/etc/php5/fpm/env.conf
  • create /home/{{ user }}/etc/php5/fpm/pool.d/{{ user }}.conf
  • create /home/{{ user }}/usr/lib/php5/php5-fpm-checkconf
  • create /home/{{ user }}/usr/lib/php5/php5-fpm-reopenlogs
  • create /home/{{ user }}/usr/lib/php5/sessionclean
  • create /etc/cron.d/php5-{{ user }} (cronjob calling /home/{{ user }}/usr/lib/php5/sessionclean for sessions cleanup)
  • create /etc/logrotate.d/php5-fpm-{{ user }} (to rotate php5-fpm logs for this instance)
  • create /lib/systemd/system/php5-fpm-{{ user }}.service (so that your instance can be managed with systemctl)

Requirements

User

The user hosting the php-fpm instance must exist on the target system and his home directory must look like that:

/home/user
         \-etc
             \-php5
                  \-fpm
                      \-pool.d
         \-usr
             \-lib
                 \-php5
         \-var
             \-lib
                 \-php5
                      \-sessions
             \-log
                 \-php-fpm
             \-run

You can use AttestationLegale.skel and AttestationLegale.users to create all the necessary stuff before calling php-fpm role.

Role Variables

For a complete list of variables, see default/main.yml.

php_fpm_pools: []

Dependencies

None

Example Playbook

---
  - hosts: all
    roles:
      - php-fpm
    vars:
      - php_fpm_pools:
        - owner: foo
          group: bar
          home: /home/foo
          php_config: []
          php_fpm_config: []
          php_fpm_pool_config: []
          php_fpm_env_config: []

php_config can be used to customize etc/php5/fpm/php.ini (see templates/php.ini.j2 for details).

php_fpm_config can be used to customize etc/php5/fpm/php-fpm.conf (see templates/php-fpm.conf.j2 for details).

php_fpm_pool_config can be used to customize etc/php5/fpm/pool.d/{{ user }.conf (see templates/pool.conf.j2 for details).

php_fpm_env_config can be used to customize etc/php5/fpm/env.conf (see templates/env.conf.j2 for details).

License

MIT / BSD

Author Information

This role was created in 2016 by ALG

ansible-role-php-fpm's People

Contributors

cguillerminet 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.