Fixes #281: Thorough support for all current Ubuntu and Debian versions.

This commit is contained in:
Jeff Geerling 2020-07-24 17:17:50 -05:00
parent 98c6f3c4f6
commit 1496cf8f92
10 changed files with 29 additions and 3 deletions

View File

@ -8,8 +8,9 @@ env:
matrix:
- MOLECULE_DISTRO: centos8
- MOLECULE_DISTRO: centos7
- MOLECULE_DISTRO: ubuntu2004
- MOLECULE_DISTRO: ubuntu1804
- MOLECULE_DISTRO: ubuntu1604
- MOLECULE_DISTRO: debian10
- MOLECULE_DISTRO: debian9
- MOLECULE_DISTRO: centos7

View File

@ -4,3 +4,6 @@ rules:
line-length:
max: 120
level: warning
ignore: |
.github/stale.yml

View File

@ -6,8 +6,8 @@ php_enablerepo: ""
# Extra packages to install (in addition to distro-specific default lists).
php_packages_extra: []
# Default PHP version to install on Debian-based OSes.
php_default_version_debian: "7.0"
# Default PHP version to install on Debian-based OSes (OS-specific).
# php_default_version_debian: ""
# PHP package state; use 'present' to make sure it's installed, or 'latest' if
# you want to upgrade or switch versions using a new repo.

View File

@ -1,5 +1,15 @@
---
# Variable setup.
- name: Include distribution and version-specific vars.
include_vars: "{{ item }}"
with_first_found:
- "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml"
- name: Set the default PHP version for Debian-based OSes.
set_fact:
php_default_version_debian: "{{ __php_default_version_debian }}"
when: ansible_os_family == 'Debian'
- name: Include OS-specific variables.
include_vars: "{{ ansible_os_family }}.yml"

2
vars/Debian-10.yml Normal file
View File

@ -0,0 +1,2 @@
---
__php_default_version_debian: "7.3"

2
vars/Debian-9.yml Normal file
View File

@ -0,0 +1,2 @@
---
__php_default_version_debian: "7.0"

View File

@ -1,4 +1,6 @@
---
__php_default_version_debian: "7.0"
__php_packages:
- php{{ php_default_version_debian }}-common
- php{{ php_default_version_debian }}-cli

2
vars/Ubuntu-16.yml Normal file
View File

@ -0,0 +1,2 @@
---
__php_default_version_debian: "7.0"

2
vars/Ubuntu-18.yml Normal file
View File

@ -0,0 +1,2 @@
---
__php_default_version_debian: "7.2"

2
vars/Ubuntu-20.yml Normal file
View File

@ -0,0 +1,2 @@
---
__php_default_version_debian: "7.4"