cellinfo
/
ansible.apt
Archived
2
0
Fork 0

Ensure to remove really useless packages (laptop-detect, tasksel,…).

This commit is contained in:
Jeremy Gardais 2017-08-17 14:27:13 +02:00
parent 5345c94edb
commit 0cf4291a9d
4 changed files with 23 additions and 2 deletions

View File

@ -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,…).

View File

@ -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

View File

@ -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

View File

@ -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
# }}}