From c33d84d50d765951706996dcee06c83371673bdf Mon Sep 17 00:00:00 2001 From: Virgile Retault Date: Thu, 21 Jul 2022 21:59:10 +0200 Subject: [PATCH] groovy universe is not supported anymore --- books/apt_proxy.yml | 2 +- hosts | 6 +++- roles/apt_cacher_ng/tasks/main.yml | 44 +++++++++++++++--------------- 3 files changed, 28 insertions(+), 24 deletions(-) diff --git a/books/apt_proxy.yml b/books/apt_proxy.yml index 2e63611..4beba54 100755 --- a/books/apt_proxy.yml +++ b/books/apt_proxy.yml @@ -1,6 +1,6 @@ #!/usr/bin/env ansible-playbook --- -- hosts: apt_proxy +- hosts: apt_cacher_ng roles: - apt_cacher_ng diff --git a/hosts b/hosts index 33c92a8..8813170 100644 --- a/hosts +++ b/hosts @@ -33,12 +33,16 @@ technetium [proxy] hindley +[apt_proxy:children] +vpn +apt_cacher_ng + [vpn] hindley sulfur technetium -[apt_proxy] +[apt_cacher_ng] hindley [prometheus] diff --git a/roles/apt_cacher_ng/tasks/main.yml b/roles/apt_cacher_ng/tasks/main.yml index 4bb031a..07b5c90 100644 --- a/roles/apt_cacher_ng/tasks/main.yml +++ b/roles/apt_cacher_ng/tasks/main.yml @@ -1,27 +1,27 @@ --- -- 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 +#- 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' +# 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 apt: