diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ee3fbd..67bc360 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 config file. +* Manage periodic, dpkg config files. * Purge default configuration files sets by others apps. diff --git a/README.md b/README.md index c0eca35..895dbeb 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,7 @@ Manage APT repos, preferences and configuration for IPR's servers. ### APT Configuration - Set periodic actions. +- Set dpkg default values. - Purge default configuration files sets by others apps. ### Sources List diff --git a/tasks/config.yml b/tasks/config.yml index de08787..583140e 100644 --- a/tasks/config.yml +++ b/tasks/config.yml @@ -11,6 +11,16 @@ with_items: - "etc/apt/apt.conf.d/10periodic" +- name: CONFIG dpkg + template: + src: "{{ item }}.j2" + dest: "/{{ item }}" + owner: root + group: root + mode: 0644 + with_items: + - "etc/apt/apt.conf.d/20dpkg" + - name: CONFIG purge default config file: path: "/etc/apt/apt.conf.d/{{ item }}" diff --git a/templates/etc/apt/apt.conf.d/20dpkg.j2 b/templates/etc/apt/apt.conf.d/20dpkg.j2 new file mode 100644 index 0000000..1f2082c --- /dev/null +++ b/templates/etc/apt/apt.conf.d/20dpkg.j2 @@ -0,0 +1,12 @@ +# {{ ansible_managed }} + +Dpkg +{ + Options + { + # keep the old version of configuration files without prompting + "--force-confold"; + # let dpkg decide by itself when multiple choice + "--force-confdef"; + } +};