fix: require user confirmation to delete other php version in Debian

This commit is contained in:
Prakasa 2024-10-11 08:54:21 +07:00
parent 39c7aa26f8
commit 5f50517d85
2 changed files with 6 additions and 1 deletions

View File

@ -4,3 +4,7 @@ php_version: '8.3'
# For Debian OSes only.
php_versions_install_recommends: false
# Purge others version need user confirmation, default to false (no delete)
# if auto delete, causing break in the existing service which depend to other version
php_purge_other_version: false

View File

@ -49,6 +49,7 @@
purge: true
force: true
register: php_version_purge
when: php_purge_other_version
- name: Also purge php-common package if any versions were just purged.
apt:
@ -56,4 +57,4 @@
state: absent
purge: true
force: true
when: php_version_purge.changed | bool
when: php_version_purge.changed | bool and php_purge_other_version