weareinteractive.php5
Ansible weareinteractive.php5 Role
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
toweareinteractive.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:
- Fork the repository.
- Create a new feature branch (
git checkout -b my-new-feature
). - Commit your changes (
git commit -am 'Add some feature'
). - Push to your branch (
git push origin my-new-feature
). - 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.
Installa
ansible-galaxy install weareinteractive.php5
Licenza
mit
Download
414
Proprietario