diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b999b6..94cd27d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,3 +7,4 @@ * Update Apt if any repositories modifications. * Manage default preferences file. * Ensure to install some additionnals tools (aptitude,…). +* Ensure to remove really useless packages (laptop-detect, tasksel,…). diff --git a/README.md b/README.md index 84e550c..a04add2 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,9 @@ Manage APT repos, preferences and configuration for IPR's servers. * **apt_tools_list** : The list of additionnals tools to install [default [see below](#tools)]. * **apt_tools_state** : State of new tools [default : `installed`]. * **apt_tools_manage** : If those tools should be managed by the role [default : `true`]. +* **apt_old_pkg_list** : The list of totally useless packages for a production server [default [see below](#tools)]. +* **apt_old_pkg_state** : State of old packages [default : `absent`]. +* **apt_old_pkg_manage** : If those old packages should be managed by the role [default : `true`]. ## Example Playbook @@ -51,8 +54,11 @@ Manage Debian's sources.list : - Stretch Backports - 500. ### Tools -Ensure to install : +- Ensure to install : * aptitude (better than `apt` to resolve dependencies issues) +- Ensure to remove really useless packages from a default installation : + * laptop-detect (if a server is a laptop…) + * tasksel (simple interface) ## Development diff --git a/defaults/main.yml b/defaults/main.yml index d7cc5d8..fd631b7 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -13,3 +13,8 @@ apt_tools_list: - aptitude apt_tools_state: 'installed' apt_tools_manage: true +apt_old_pkg_list: + - laptop-detect + - tasksel +apt_old_pkg_state: 'absent' +apt_old_pkg_manage: true diff --git a/tasks/main.yml b/tasks/main.yml index e4b2160..d7ea0c5 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -39,7 +39,7 @@ when: apt_src_list_manage and apt_stretch_manage # }}} -# Packages +# Packages {{{ - name: Ensure useful tools packages apt: name: '{{ item }}' @@ -47,3 +47,12 @@ with_items: - '{{ apt_tools_list }}' when: apt_tools_manage + +- name: Ensure to purge useless packages + apt: + name: '{{ item }}' + state: '{{ apt_old_pkg_state }}' + with_items: + - '{{ apt_old_pkg_list }}' + when: apt_old_pkg_manage +# }}}