Ansible Role - PHP Versions
Go to file
Jeff Geerling 731382cbdd
Merge pull request #51 from oxyc/patch-1
Fix php 7.4 not purged on debian
2020-09-29 18:03:22 -05:00
.github Add probot/stale configuration to repository for stale issues. 2020-03-05 10:45:23 -06:00
defaults Fixes #43: Add support for PHP 7.4, default to 7.3. 2019-12-02 12:28:03 -06:00
meta Don't use galaxy role_name on roles with dashes in names. 2020-05-26 12:06:38 -05:00
molecule/default Make sure molecule lint script has set -e option. 2020-02-24 09:45:49 -06:00
tasks Fix Ubuntu installation issue if dirmngr isn't present. 2020-02-20 16:44:42 -06:00
vars Fix php 7.4 not purged on debian 2020-09-08 12:47:04 -03:00
.ansible-lint Ignore the tyranny of ansible-lint rule 106. 2020-08-20 19:23:29 -05:00
.gitignore Fixes #27: Default to PHP 7.2, fully support PHP 7.3. 2018-12-06 15:29:10 -06:00
.travis.yml Upgrade Travis CI docker version to fix Molecule tests. 2020-08-12 14:56:25 -05:00
.yamllint Upgrade Travis CI docker version to fix Molecule tests. 2020-08-12 14:56:25 -05:00
LICENSE Initial commit, direct port from Drupal VM. 2017-05-19 12:36:36 -05:00
README.md Fixes #43: Add support for PHP 7.4, default to 7.3. 2019-12-02 12:28:03 -06: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.3'

The PHP version to be installed. Any currently-supported PHP major version is a valid option (e.g. 7.2, 7.3, 7.4 etc.).

php_versions_install_recommends: false

(For Debian OSes only) Whether to install recommended packages. This is set to no by default because setting it to yes often leads to multiple PHP versions being installed (thus making a bit of a mess) when using repos like Ondrej's PHP PPA for Ubuntu.

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.3'

  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.