Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/geerlingguy/ansible-role-php-versions
Ansible Role - PHP Versions
https://github.com/geerlingguy/ansible-role-php-versions
ansible centos debian drupal ondrej php remi repository role ubuntu versions
Last synced: 25 days ago
JSON representation
Ansible Role - PHP Versions
- Host: GitHub
- URL: https://github.com/geerlingguy/ansible-role-php-versions
- Owner: geerlingguy
- License: mit
- Created: 2017-05-19T17:22:40.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-07-31T04:25:05.000Z (3 months ago)
- Last Synced: 2024-09-28T10:23:27.081Z (about 1 month ago)
- Topics: ansible, centos, debian, drupal, ondrej, php, remi, repository, role, ubuntu, versions
- Homepage: https://galaxy.ansible.com/geerlingguy/php-versions/
- Size: 66.4 KB
- Stars: 97
- Watchers: 5
- Forks: 69
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Ansible Role: PHP Versions
[![CI](https://github.com/geerlingguy/ansible-role-php-versions/workflows/CI/badge.svg?event=push)](https://github.com/geerlingguy/ansible-role-php-versions/actions?query=workflow%3ACI)
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](https://www.drupalvm.com) 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: '8.3'
The PHP version to be installed. Any [currently-supported PHP major version](http://php.net/supported-versions.php) is a valid option (e.g. `7.4`, `8.1`, `8.2`, or `8.3`).
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
become: true
vars:
php_version: '8.3'
roles:
- name: 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](https://www.jeffgeerling.com/), author of [Ansible for DevOps](https://www.ansiblefordevops.com/).