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.
N/A
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.
- 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.
- hosts: webservers
vars:
php_version: '7.1'
roles:
- role: geerlingguy.repo-remi
when: ansible_os_family == 'RedHat'
- geerlingguy.php-versions
- geerlingguy.php
MIT / BSD
This role was created in 2017 by Jeff Geerling, author of Ansible for DevOps.