weareinteractive.php5

Ansible weareinteractive.php5 Role

Build Status Galaxy GitHub Tags GitHub Stars

weareinteractive.php5 is an Ansible role that:

  • Installs PHP 5
  • Configures PHP 5
  • Installs extra packages
  • Installs PEAR packages
  • Installs PECL packages
  • Configures log rotation

Installation

To install using ansible-galaxy:

$ ansible-galaxy install weareinteractive.php5

To install using requirements.yml:

- src: weareinteractive.php5

To install using git:

$ git clone https://github.com/weareinteractive/ansible-php5.git weareinteractive.php5

Dependencies

  • Ansible version 2.4 or higher. Note:

This role has moved from franklinkim.php5 to weareinteractive.php5!

Variables

Here are the default variables for this role, found in defaults/main.yml.

---
# For more information about default variables see:
# http://www.ansibleworks.com/docs/playbooks_variables.html#id26
#
# PHP 5 Packages:
#   - php5-gd
#   - php5-dev
# PHP 5 CLI Configuration:
#   - { section: PHP, option: default_charset, value: UTF-8 }
# PHP 5 Apache Configuration:
#   - { section: PHP, option: default_charset, value: UTF-8 }
# PHP 5 Modules:
#  - { name: gd, config: [] }
#  - { name: curl, config: [] }
#  - { name: tidy, config: [] }
#  - { name: mysql, config: [] }
#  - { name: mcrypt, config: [] }
#  - { name: xmlrpc, config: [] }
#  - { name: xdebug, config: [] }
#  - { name: imagick, config: [] }
#  - { name: mail, type: 'php', config: [] }
#  - { name: mail-mime, type: 'php', config: [] }
# PEAR Packages:
#  - Mail_IMAPv2
# PECL Packages:
#  - { name: yaml, config: [] }
#  - { name: mailparse, config: [] }

# User
php5_user: www-data
# PHP 5 Packages (with versions)
php5_packages:
  - php5
  - php5-dev
  - php5-cli
  - php-pear
# Error log path
php5_log_path: /var/log/php5
# CLI configuration settings
php5_cli_config: []
# FPM configuration settings
php5_fpm_config: []
# Apache configuration settings
php5_apache2_config: []
# List of PEAR packages to install
php5_pear_packages: []
# List of PECL packages to install
php5_pecl_packages: []
# List of PHP modules to install & configure
php5_modules: []

Handlers

These are the handlers defined in handlers/main.yml.

---
- name: Restart Apache2
  service: name=apache2 state=restarted

- name: Restart PHP 5-FPM
  service: name=php5-fpm state=restarted

Usage

Here’s an example playbook:

---
- hosts: all
  become: yes
  roles:
    - weareinteractive.apt
    - weareinteractive.php5
  vars:
    php5_cli_config:
      - { section: PHP, option: default_charset, value: UTF-8 }
      - { section: Date, option: date.timezone, value: Europe/Berlin }
      - { section: PHP, option: error_log, value: /var/log/php5/error-cli.log }
    php5_pear_packages:
      - { name: Mail, config: [] }
    php5_pecl_packages:
      - { name: hrtime, config: [] }

Testing

To run tests:

$ git clone https://github.com/weareinteractive/ansible-php5.git
$ cd ansible-php5
$ make test

Contributing

Follow these steps for contributions:

  1. Fork the repository.
  2. Create a new feature branch (git checkout -b my-new-feature).
  3. Commit your changes (git commit -am 'Add some feature').
  4. Push to your branch (git push origin my-new-feature).
  5. Create a new Pull Request.

Note: To update the README.md file, please install and run ansible-role:

$ gem install ansible-role
$ ansible-role docgen

License

Copyright (c) We Are Interactive under the MIT license.

Informazioni sul progetto

Installs and configures php5

Installa
ansible-galaxy install weareinteractive.php5
Licenza
mit
Download
414
Proprietario