[apt] Better configuration to pin packages
Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
parent
1d1b31c461
commit
475fe06fb7
@ -17,7 +17,7 @@
|
||||
group: root
|
||||
mode: 0644
|
||||
|
||||
- name: Connfigure extra repositories
|
||||
- name: Configure extra repositories
|
||||
template:
|
||||
src: apt/sources.list.d/sources.list.j2
|
||||
dest: "/etc/apt/sources.list.d/{{ item.name }}.list"
|
||||
@ -28,13 +28,13 @@
|
||||
|
||||
- name: Configure pin from future distributions
|
||||
template:
|
||||
src: "apt/{{ item[0] }}.d/pin.list.j2"
|
||||
dest: "/etc/apt/{{ item[0] }}.d/{{ item[1].key }}.list"
|
||||
src: "apt/{{ item[0] }}.d/pin{{ item[1] }}.j2"
|
||||
dest: "/etc/apt/{{ item[0] }}.d/{{ item[2].key }}{{ item[1] }}"
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0644
|
||||
with_nested:
|
||||
- ["sources.list", "preferences"]
|
||||
- [["sources.list", ".list"], ["preferences", ""]]
|
||||
- "{{ apt.pin|dict2items }}"
|
||||
|
||||
- name: Update APT cache
|
||||
|
@ -2,11 +2,11 @@
|
||||
|
||||
|
||||
Package: *
|
||||
Pin: release n={{ item[1].key }}
|
||||
Pin: release n={{ item[2].key }}
|
||||
Pin-Priority: 1
|
||||
{% for package in item[1].value -%}
|
||||
{% for package in item[2].value -%}
|
||||
|
||||
Package: {{ package }}
|
||||
Pin: release n={{ item[1].key }}
|
||||
Pin: release n={{ item[2].key }}
|
||||
Pin-Priority: 900
|
||||
{% endfor -%}
|
@ -1,3 +1,3 @@
|
||||
{{ ansible_header | comment }}
|
||||
|
||||
deb {{ apt.mirror }}debian {{ item[1].key }} main contrib non-free
|
||||
deb {{ apt.mirror }}debian {{ item[2].key }} main contrib non-free
|
||||
|
Loading…
Reference in New Issue
Block a user