user newer version of apt-cacher-ng, but with low expectation
This commit is contained in:
parent
200632c8e5
commit
26c72a37cc
1 changed files with 24 additions and 0 deletions
|
@ -1,4 +1,28 @@
|
||||||
---
|
---
|
||||||
|
- name: Use a newer version of apt cacher nc for ubuntu 20.04
|
||||||
|
block:
|
||||||
|
- name: Set the default release
|
||||||
|
lineinfile:
|
||||||
|
path: /etc/apt/apt.conf.d/01-vendor-ubuntu
|
||||||
|
regexp: '^APT::Default-Release '
|
||||||
|
line: "APT::Default-Release \"{{ ansible_facts['lsb']['codename'] }}\";"
|
||||||
|
- name: Pin node exporter
|
||||||
|
copy:
|
||||||
|
dest: /etc/apt/preferences.d/pin-apt-cacher-nc
|
||||||
|
content: |
|
||||||
|
Package: apt-cacher-nc
|
||||||
|
Pin: release n={{ ansible_facts['lsb']['codename'] }}
|
||||||
|
Pin-Priority: -10
|
||||||
|
|
||||||
|
Package: apt-cacher-nc
|
||||||
|
Pin: release n=groovy
|
||||||
|
Pin-Priority: 900
|
||||||
|
- name: Add the repo from groovy
|
||||||
|
apt_repository:
|
||||||
|
repo: deb http://fr.archive.ubuntu.com/ubuntu groovy universe
|
||||||
|
state: present
|
||||||
|
when: ansible_facts['lsb']['id'] == 'Ubuntu' and ansible_facts['lsb']['codename'] == 'focal'
|
||||||
|
|
||||||
- name: Install apt-cacher-ng
|
- name: Install apt-cacher-ng
|
||||||
apt:
|
apt:
|
||||||
name:
|
name:
|
||||||
|
|
Loading…
Reference in a new issue