Browse Source

Rewrite the deployement of apt configuration

Emmanuel Bouthenot 10 năm trước cách đây
mục cha
commit
05612b65dc

+ 4 - 1
roles/common/tasks/base.yml

@@ -12,7 +12,10 @@
     - Reload apt cache
 
 - name: Write /etc/apt/apt.conf.d configuration files
-  template: src=apt/{{ item }}.j2 dest=/etc/apt/apt.conf.d/{{ item }} owner=root group=root mode=0644
+  template: src=apt/apt-options.j2 dest=/etc/apt/apt.conf.d/90local owner=root group=root mode=0644
+
+- name: Remove deprecated apt options files
+  file: path=/etc/apt/apt.conf.d/{{ item }} state=absent
   with_items:
     - local-recommends
     - local-pdiffs

+ 1 - 0
roles/common/templates/apt/local-recommends.j2 → roles/common/templates/apt/apt-options.j2

@@ -2,5 +2,6 @@
 {% from 'templates/ansible/prolog.j2' import prolog with context %}
 {{ prolog('//') }}
 {% endif -%}
+Acquire::Pdiffs "false";
 APT::Install-Recommends "false";
 APT::Install-Suggests "false";

+ 0 - 5
roles/common/templates/apt/local-pdiffs.j2

@@ -1,5 +0,0 @@
-{% if ansible_prolog -%}
-{% from 'templates/ansible/prolog.j2' import prolog with context %}
-{{ prolog('//') }}
-{% endif -%}
-Acquire::Pdiffs "false";