From dc037fe18dae7e4fea1e8f3f1cb818124222aa2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gardais=20J=C3=A9r=C3=A9my?= Date: Thu, 17 Aug 2017 17:31:56 +0200 Subject: [PATCH] Purge default configuration files sets by others apps. --- CHANGELOG.md | 1 + README.md | 3 +++ defaults/main.yml | 8 ++++++++ tasks/config.yml | 8 ++++++++ 4 files changed, 20 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6967d59..8ee3fbd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,3 +9,4 @@ * Ensure to install some additionnals tools (aptitude,…). * Ensure to remove really useless packages (laptop-detect, tasksel,…). * Manage periodic config file. +* Purge default configuration files sets by others apps. diff --git a/README.md b/README.md index 719e6d4..c0eca35 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,8 @@ Manage APT repos, preferences and configuration for IPR's servers. * **apt_conf_update_pkg_lists** : Period of automatic repositories update in days [default : `1`]. * **apt_conf_download_upgradeable_pkg** : Period of automatic download of upgradeable packages in days [default : `1`]. * **apt_conf_auto_clean_interval** : Period of automatic clean of no longer available packages [default : `0`]. +* **apt_conf_purge_list** : The list of default APT configuration files sets by differents packages. +* **apt_conf_purge_manage** : If the purge of default configuration should be managed [default : `true`]. * **apt_src_list_manage** : If apt sources list files should be managed [default : `true`]. * **apt_purge_src_list_file** : If the default sources.file must be absent [default : `true`]. * **apt_stretch_manage** : If Stretch configuration should be managed [default : `true`]. @@ -47,6 +49,7 @@ Manage APT repos, preferences and configuration for IPR's servers. ### APT Configuration - Set periodic actions. +- Purge default configuration files sets by others apps. ### Sources List Manage Debian's sources.list : diff --git a/defaults/main.yml b/defaults/main.yml index 0f08282..2cc16cf 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -4,6 +4,14 @@ apt_conf_update_pkg_lists: 1 apt_conf_download_upgradeable_pkg: 1 apt_conf_auto_clean_interval: 0 +apt_conf_purge_list: + - 00trustcdrom + - 01autoremove + - 01autoremove-kernels + - 15hobbit-plugins-update-stamp + - 20listchanges + - 70debconf +apt_conf_purge_manage: true apt_src_list_manage: true apt_purge_src_list_file: true diff --git a/tasks/config.yml b/tasks/config.yml index ee7e780..de08787 100644 --- a/tasks/config.yml +++ b/tasks/config.yml @@ -10,3 +10,11 @@ mode: 0644 with_items: - "etc/apt/apt.conf.d/10periodic" + +- name: CONFIG purge default config + file: + path: "/etc/apt/apt.conf.d/{{ item }}" + state: absent + with_items: + - "{{ apt_conf_purge_list }}" + when: apt_conf_purge_manage