Skip to content
Snippets Groups Projects
Commit 306d00c9 authored by Chris Croome's avatar Chris Croome
Browse files

remove config files when removing versions

parent c8e17fc6
No related branches found
No related tags found
1 merge request!1Merge Sury
Pipeline #20578 failed
......@@ -4,14 +4,14 @@ php_dpkg: /usr/bin/dpkg
php_phpquery: /usr/sbin/phpquery
php_versions:
'8.1':
state: absent
state: present
sapis:
apache2:
state: absent
cli:
state: present
fpm:
state: present
state: absent
phpdbg:
state: absent
'8.0':
......
......@@ -6,12 +6,22 @@
apt:
pkg: "php{{ version }}*"
state: absent
purge: true
autoclean: true
autoremove: true
loop: "{{ php_versions_remove }}"
loop_control:
loop_var: version
label: "php{{ version }}"
label: "{{ version }}"
- name: PHP config files absent
file:
path: "/etc/php/{{ version }}/"
state: absent
loop: "{{ php_versions_remove }}"
loop_control:
loop_var: version
label: "{{ version }}"
tags:
- php
......
......@@ -2,6 +2,9 @@
- name: PHP checks
block:
# TODO
# - Check that when a version SAPI is set to present the version is also set to present
# - Check that when a version is set to absent the SAPIs are also set to absent, if the state is set
- name: Check that depreciated variables are not used
assert:
that:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment