diff --git a/CHANGELOG.md b/CHANGELOG.md index 67bc360..7645c16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,5 +8,5 @@ * Manage default preferences file. * Ensure to install some additionnals tools (aptitude,…). * Ensure to remove really useless packages (laptop-detect, tasksel,…). -* Manage periodic, dpkg config files. +* Manage general, periodic and dpkg config files. * Purge default configuration files sets by others apps. diff --git a/README.md b/README.md index 895dbeb..ca6c4cf 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,7 @@ Manage APT repos, preferences and configuration for IPR's servers. ## Configuration ### APT Configuration +- Set general APT configurations. - Set periodic actions. - Set dpkg default values. - Purge default configuration files sets by others apps. diff --git a/tasks/config.yml b/tasks/config.yml index 583140e..4a1bacf 100644 --- a/tasks/config.yml +++ b/tasks/config.yml @@ -9,6 +9,7 @@ group: root mode: 0644 with_items: + - "etc/apt/apt.conf.d/10general" - "etc/apt/apt.conf.d/10periodic" - name: CONFIG dpkg diff --git a/templates/etc/apt/apt.conf.d/10general.j2 b/templates/etc/apt/apt.conf.d/10general.j2 new file mode 100644 index 0000000..6422bf8 --- /dev/null +++ b/templates/etc/apt/apt.conf.d/10general.j2 @@ -0,0 +1,10 @@ +# {{ ansible_managed }} + +APT +{ + APT::autoclean "1"; + APT::clean-installed "1"; +} + +# The date of the last successful repositories update +APT::Update::Post-Invoke {"touch /var/lib/apt/periodic/update-success-stamp 2>/dev/null || true";};