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.
Available variables are listed below, along with default values (see
The PHP version to be installed. Any currently-supported PHP major version is a valid option (e.g.
(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.
- geerlingguy.php is a soft dependency as the
php_versionvariable is required to be set.
- geerlingguy.repo-remi, if you're using CentOS or a Red Hat derivative.
- hosts: webservers become: true vars: php_version: '8.2' roles: - name: geerlingguy.repo-remi when: ansible_os_family == 'RedHat' - geerlingguy.php-versions - geerlingguy.php
MIT / BSD