[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
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
|
|
||||||
- name: Connfigure extra repositories
|
- name: Configure extra repositories
|
||||||
template:
|
template:
|
||||||
src: apt/sources.list.d/sources.list.j2
|
src: apt/sources.list.d/sources.list.j2
|
||||||
dest: "/etc/apt/sources.list.d/{{ item.name }}.list"
|
dest: "/etc/apt/sources.list.d/{{ item.name }}.list"
|
||||||
@ -28,13 +28,13 @@
|
|||||||
|
|
||||||
- name: Configure pin from future distributions
|
- name: Configure pin from future distributions
|
||||||
template:
|
template:
|
||||||
src: "apt/{{ item[0] }}.d/pin.list.j2"
|
src: "apt/{{ item[0] }}.d/pin{{ item[1] }}.j2"
|
||||||
dest: "/etc/apt/{{ item[0] }}.d/{{ item[1].key }}.list"
|
dest: "/etc/apt/{{ item[0] }}.d/{{ item[2].key }}{{ item[1] }}"
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
mode: 0644
|
mode: 0644
|
||||||
with_nested:
|
with_nested:
|
||||||
- ["sources.list", "preferences"]
|
- [["sources.list", ".list"], ["preferences", ""]]
|
||||||
- "{{ apt.pin|dict2items }}"
|
- "{{ apt.pin|dict2items }}"
|
||||||
|
|
||||||
- name: Update APT cache
|
- name: Update APT cache
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
|
|
||||||
|
|
||||||
Package: *
|
Package: *
|
||||||
Pin: release n={{ item[1].key }}
|
Pin: release n={{ item[2].key }}
|
||||||
Pin-Priority: 1
|
Pin-Priority: 1
|
||||||
{% for package in item[1].value -%}
|
{% for package in item[2].value -%}
|
||||||
|
|
||||||
Package: {{ package }}
|
Package: {{ package }}
|
||||||
Pin: release n={{ item[1].key }}
|
Pin: release n={{ item[2].key }}
|
||||||
Pin-Priority: 900
|
Pin-Priority: 900
|
||||||
{% endfor -%}
|
{% endfor -%}
|
@ -1,3 +1,3 @@
|
|||||||
{{ ansible_header | comment }}
|
{{ 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