Ansible Role - PHP Versions
Go to file
Jeff Geerling b2de0f333d Merge pull request #8 from oxyc/beetbox
Simplify purge task fixing odd apt resolve solutions
2017-09-18 20:04:22 -05:00
defaults Initial commit, direct port from Drupal VM. 2017-05-19 12:36:36 -05:00
meta Issue #1: Fix test errors; role should not be strictly dependent on geerlingguy.php. 2017-05-19 12:44:54 -05:00
tasks simplify purge task fixing odd apt resolve solutions 2017-09-18 14:13:15 -05:00
tests Initial commit, direct port from Drupal VM. 2017-05-19 12:36:36 -05:00
vars Issue #3: Do not override php variables set by playbook 2017-05-31 12:19:47 -05:00
.gitignore Initial commit, direct port from Drupal VM. 2017-05-19 12:36:36 -05:00
.travis.yml Fixes #1: Make sure PHP version is actually tested. 2017-05-19 12:50:23 -05:00
LICENSE Initial commit, direct port from Drupal VM. 2017-05-19 12:36:36 -05:00
README.md Fix README example 2017-07-18 16:12:01 +01:00

Ansible Role: PHP Versions

Build Status

Allows different PHP versions to be installed when using the geerlingguy.php role (or a similar role). This role was originally built for Drupal VM but was released more generically so others could use an easier mechanism for switching PHP versions.

Requirements

N/A

Role Variables

Available variables are listed below, along with default values (see defaults/main.yml):

php_version: '7.1'

The PHP version to be installed. Any currently-supported PHP major version is a valid option (e.g. 5.6, 7.0, 7.1, etc.

Dependencies

  • geerlingguy.php is a soft dependency as the php_version variable is required to be set.
  • geerlingguy.repo-remi, if you're using CentOS or a Red Hat derivative.

Example Playbook

- hosts: webservers

  vars:
    php_version: '7.1'

  roles:
    - role: geerlingguy.repo-remi
      when: ansible_os_family == 'RedHat'
    - geerlingguy.php-versions
    - geerlingguy.php

License

MIT / BSD

Author Information

This role was created in 2017 by Jeff Geerling, author of Ansible for DevOps.