Giter Site home page Giter Site logo

soaresnetoh / ansible-role-configure-php-ini Goto Github PK

View Code? Open in Web Editor NEW

This project forked from udelarinterior/ansible-role-configure-php-ini

0.0 0.0 0.0 20 KB

Ansible role to configure php.ini files of our Debian servers

License: GNU General Public License v3.0

ansible-role-configure-php-ini's Introduction

Ansible role configure_php_ini

Ansible role to configure php.ini file of our Apache server in acordance to the listed on php_ini_parameters_and_values

Requirements

Ansible >= 2.3

Role Variables

By default, PHP version is set according to default version of the distribution: 7.0 in debian stretch, 7.0 in debian buster.

If you use a custom version of PHP, you can force it with the variable php_ini_php_version.

Full paths to cli/php.ini and apache2/php.ini files are set to default ones, acccording to PHP version. But you can also force them defining the variables cli_php_ini_path and/or apache_php_ini_path.

PHP configuration parameters themselves, for CLI PHP and/or Apache PHP are set with the following structures (choice of parameters subset and values are, of course, exampes):

# List of CLI PHP parameters to configure
cli_php_ini_parameters_and_values:
- parameter: post_max_size
  value: 1G
- parameter: upload_max_filesize
  value: 1G
- parameter: max_execution_time
  value: 90
- parameter: max_input_time
  value: 90
- parameter: memory_limit
  value: 256M
- parameter: date.timezone
  value: '"America/Montevideo"'

# List of APACHE PHP parameters to configure
apache_php_ini_parameters_and_values:
- parameter: post_max_size
  value: 256M
- parameter: upload_max_filesize
  value: 256M
- parameter: date.timezone
  value: '"America/Montevideo"'

Notice that string values must be double quoted to remain quoted in php.ini file.

Dependencies

No dependences

Example Playbook

- hosts: servers_lamp
  roles:
  - role: configure_php_ini
    cli_php_ini_parameters_and_values:
    - parameter: max_execution_time
      value: 90
    - parameter: max_input_time
      value: 90
    apache_php_ini_parameters_and_values:
    - parameter: post_max_size
      value: 256M
    - parameter: upload_max_filesize
      value: 256M

License

(c) Universidad de la República (UdelaR), Red de Unidades Informáticas de la UdelaR en el Interior. licenced under GPL-v3

Author Information

@santiagomr @UdelaRInterior https://proyectos.interior.edu.uy/

ansible-role-configure-php-ini's People

Contributors

santiagomr avatar ulvida 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.