Skip to content
Snippets Groups Projects
Commit 48a369bd authored by Andreas Hamacher's avatar Andreas Hamacher
Browse files

role to pin packages on ubuntu using apt preference files

parent 8200243e
No related branches found
No related tags found
Loading
---
- name: create package hold files in apt prefferences
template:
src: hold.pref.j2
dest: /etc/apt/preferences.d/hold-{{ item.pkg_name }}.pref
become: true
when: ansible_os_family=="Debian"
loop: "{{ apt_preferences }}"
# example data
#apt_preferences:
# - { pkg_name: 'yaru-theme-sound', pkg_version: "20.04.10.1", pkg_priority: "1002" }
# - { pkg_name: 'yaru-theme-gnome-shell', pkg_version: "20.04.10.1" }
# This file is generated by ansible role apt_preferences
Explanation: : {{ item.pkg_name }}
Package: {{ item.pkg_name }}
Pin: version {{ item.pkg_version }}
Pin-Priority: {{ item.pkg_priority|default("1001", true) }}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment