Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

Commit

Permalink
Update geerlingguy.php-versions role to 3.1.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
geerlingguy committed Apr 18, 2019
1 parent 021cc8f commit c46d02e
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 16 deletions.
2 changes: 1 addition & 1 deletion provisioning/requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
- src: geerlingguy.php-tideways
version: 2.2.0
- src: geerlingguy.php-versions
version: 3.0.0
version: 3.1.0
- src: geerlingguy.php-xdebug
version: 2.5.1
- src: geerlingguy.php-xhprof
Expand Down
3 changes: 3 additions & 0 deletions provisioning/roles/geerlingguy.php-versions/.ansible-lint
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
skip_list:
- '306'
- '503'
2 changes: 1 addition & 1 deletion provisioning/roles/geerlingguy.php-versions/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ N/A

Available variables are listed below, along with default values (see `defaults/main.yml`):

php_version: '7.7'
php_version: '7.2'

The PHP version to be installed. Any [currently-supported PHP major version](http://php.net/supported-versions.php) is a valid option (e.g. `5.6`, `7.1`, `7.2`, `7.3`, etc.).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@

post_tasks:
- name: Confirm PHP version is correct.
shell: "php -v | grep -F '{{ php_version }}'"
shell: php -v | grep -F '{{ php_version }}'
changed_when: false
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@

post_tasks:
- name: Confirm PHP version is correct.
shell: "php -v | grep -F '{{ php_version }}'"
shell: php -v | grep -F '{{ php_version }}'
changed_when: false
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@

post_tasks:
- name: Confirm PHP version is correct.
shell: "php -v | grep -F '{{ php_version }}'"
shell: php -v | grep -F '{{ php_version }}'
changed_when: false
17 changes: 6 additions & 11 deletions provisioning/roles/geerlingguy.php-versions/tasks/setup-Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,14 @@

- name: Update apt caches after repo is added (Debian).
apt: update_cache=true
when: php_ondrej_debian_repo.changed and (ansible_distribution == "Debian")
when:
- php_ondrej_debian_repo.changed
- ansible_distribution == "Debian"
tags: ['skip_ansible_lint']

# PHP package purges.
- name: Purge PHP version packages.
- name: Purge PHP version packages (besides the currently chosen php_version).
apt:
name: "{{ item }}"
name: "{{ php_versions_debian | reject('search', 'php' ~ php_version) | list }}"
state: absent
purge: true
force: true
with_items:
- php5.6-common
- php7.0-common
- php7.1-common
- php7.2-common
- php7.3-common
when: "'php' + php_version not in item"
7 changes: 7 additions & 0 deletions provisioning/roles/geerlingguy.php-versions/vars/Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,10 @@ __php_packages:
- "php{{ php_version }}-sqlite3"
- "php{{ php_version }}-xml"
- "php{{ php_version }}-yaml"

php_versions_debian:
- php5.6-common
- php7.0-common
- php7.1-common
- php7.2-common
- php7.3-common

0 comments on commit c46d02e

Please sign in to comment.