Giter Site home page Giter Site logo

ansible-role-php's Introduction

Ansible role PHP

This is a role for installing and managing PHP cli and fpm.

Vars

Name Description Default Required
php_version PHP version to install 8.1 yes
php_ini_global Global settings for cli and fpm / no
php_ini_cli Settings for cli / no
php_ini_fpm Settings for fpm (all pools) / no
php_default_extensions_enabled Install a list of default extensions (see vars/main.yml) true no
php_extensions List of own PHP extensions to be installed [] no
php_set_alternative Use this installation as update alternative true no
php_fpm_install Install FPM service true no
php_fpm_enable Enable FPM service true no
php_fpm_allow_restart Allow role to restart FPM if necessary true no
php_fpm_error_log Location of FPM error log /var/log/php_errors.log no
php_fpm_error_log_level FPM log level warning no
php_fpm_pools List of FPM pools (see php_fpm_pools details) [] no
php_composer_install Flag wether to install composer or not true no
php_composer_target Path to install composer /usr/local/bin/composer no

php_fpm_pools details

Name Description Default Required
name Name of the pool / yes
listen Listen (socket/interface) / yes
listen_owner Owner for the socket www-data no
listen_group Group for the socket www-data no
listen_mode Filemode for the socket "0660" no
listen_allowed_clients Allowed clients 127.0.0.1 no
user Effective user for executing PHP www-data
group Effective group for executing PHP www-data
error_log Path for error log / no
slow_log Path for slow log / no
environment Environment vars for FPM {} no
admin_values Admin values to set for pool / no
extra_settings Extra settings like clear_env for pool see default_php_fpm_pool_app_config in vars/main.yml no

Example config

Configure one pool

php_fpm_pools:
  - name: www
    listen: /run/php/www.sock
    error_log: /var/log/php_fpm_www_errors.log
    slow_log: /var/log/php_fpm_www_slow.log
    extra_vars:
      clear_env: "no"
    environment:
      DATABASE_HOST: 10.0.0.1

Use the role

- host: webserver
  become: yes
  roles:
    - role: phizzl.php

ansible-role-php's People

Contributors

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