Ensure to remove really useless packages (laptop-detect, tasksel,…).
This commit is contained in:
parent
5345c94edb
commit
0cf4291a9d
|
@ -7,3 +7,4 @@
|
||||||
* Update Apt if any repositories modifications.
|
* Update Apt if any repositories modifications.
|
||||||
* Manage default preferences file.
|
* Manage default preferences file.
|
||||||
* Ensure to install some additionnals tools (aptitude,…).
|
* Ensure to install some additionnals tools (aptitude,…).
|
||||||
|
* Ensure to remove really useless packages (laptop-detect, tasksel,…).
|
||||||
|
|
|
@ -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_list** : The list of additionnals tools to install [default [see below](#tools)].
|
||||||
* **apt_tools_state** : State of new tools [default : `installed`].
|
* **apt_tools_state** : State of new tools [default : `installed`].
|
||||||
* **apt_tools_manage** : If those tools should be managed by the role [default : `true`].
|
* **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
|
## Example Playbook
|
||||||
|
|
||||||
|
@ -51,8 +54,11 @@ Manage Debian's sources.list :
|
||||||
- Stretch Backports - 500.
|
- Stretch Backports - 500.
|
||||||
|
|
||||||
### Tools
|
### Tools
|
||||||
Ensure to install :
|
- Ensure to install :
|
||||||
* aptitude (better than `apt` to resolve dependencies issues)
|
* 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
|
## Development
|
||||||
|
|
||||||
|
|
|
@ -13,3 +13,8 @@ apt_tools_list:
|
||||||
- aptitude
|
- aptitude
|
||||||
apt_tools_state: 'installed'
|
apt_tools_state: 'installed'
|
||||||
apt_tools_manage: true
|
apt_tools_manage: true
|
||||||
|
apt_old_pkg_list:
|
||||||
|
- laptop-detect
|
||||||
|
- tasksel
|
||||||
|
apt_old_pkg_state: 'absent'
|
||||||
|
apt_old_pkg_manage: true
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
when: apt_src_list_manage and apt_stretch_manage
|
when: apt_src_list_manage and apt_stretch_manage
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
# Packages
|
# Packages {{{
|
||||||
- name: Ensure useful tools packages
|
- name: Ensure useful tools packages
|
||||||
apt:
|
apt:
|
||||||
name: '{{ item }}'
|
name: '{{ item }}'
|
||||||
|
@ -47,3 +47,12 @@
|
||||||
with_items:
|
with_items:
|
||||||
- '{{ apt_tools_list }}'
|
- '{{ apt_tools_list }}'
|
||||||
when: apt_tools_manage
|
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
|
||||||
|
# }}}
|
||||||
|
|
Reference in New Issue