buluma.php_versions

Ansible Role php_versions

This role allows you to install different versions of PHP.

GitHub Version Issues Pull Requests Downloads
github Version Issues PullRequests Ansible Role

Example Playbook

Here's an example taken from molecule/default/converge.yml. This example is tested every time changes are made.

---
- name: Converge
  hosts: all
  become: true
  gather_facts: true

  vars:
    php_enable_webserver: false

  pre_tasks:
    - name: Update apt cache.
      apt: update_cache=true cache_valid_time=600
      when: ansible_os_family == 'Debian'

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

  post_tasks:
    - name: Confirm PHP version is correct.
      shell: php -v | grep -F '{{ php_version }}'
      changed_when: false

You can find a complete guide and example on how to use these roles.

Role Variables

Default values for the variables can be found in defaults/main.yml:

---
# The PHP version to install.
php_version: '7.4'

# This is for Debian only.
php_versions_install_recommends: false

Requirements

Roles Used

The following roles are used to set up your system. You may choose to set up your system differently.

Requirement GitHub Version
geerlingguy.repo-remi Ansible Molecule Version
buluma.php_versions Ansible Molecule Version
buluma.php Ansible Molecule Version

Context

This role is part of several compatible roles. Check out the documentation for these roles for more details.

Here’s a list of related roles:

dependencies

Compatibility

This role has been tested on the following Docker images:

Container Tags
EL all
Debian all
Ubuntu all

You will need at least Ansible version 2.4. Tests have been done with:

  • The version before this one.
  • The current version.
  • The development version.

If you find any problems, please report them in GitHub.

Changelog

See the Role History.

License

Apache-2.0.

Author Information

Shadow Walker.

Informazioni sul progetto

Allows different PHP versions to be installed.

Installa
ansible-galaxy install buluma.php_versions
Licenza
apache-2.0
Download
52.2k
Proprietario
DevOps Engineer