This is a weird corner case that currently only seems to occur if you already have PHP 7.2 installed (as the geerlingguy/drupal-vm base box for Vagrant does), and you set php_version to 7.1... see https://github.com/geerlingguy/drupal-vm/issues/1963 for all the gory details.
In local testing, adding the following task in tasks/setup-Debian.yml seems to fix the issue:
- name: Purge PHP version packages (besides the currently chosen php_version).
apt:
name: "{{ php_versions_debian | reject('search', 'php' ~ php_version) | list }}"
state: absent
purge: true
force: true
register: php_version_purge
- name: Also purge php-common package if any versions were just purged.
apt:
name: php-common
state: absent
purge: true
force: true
when: php_version_purge.changed | bool
This is a weird corner case that currently only seems to occur if you already have PHP 7.2 installed (as the geerlingguy/drupal-vm base box for Vagrant does), and you set
php_version
to 7.1... see https://github.com/geerlingguy/drupal-vm/issues/1963 for all the gory details.In local testing, adding the following task in
tasks/setup-Debian.yml
seems to fix the issue: