From 8038ad8f2c2b1b9b55eebd21c63dfd5daedcd409 Mon Sep 17 00:00:00 2001 From: Blallo Date: Fri, 11 Mar 2022 11:43:14 +0100 Subject: [PATCH] Switch to bullseye --- meta/main.yml | 3 --- playbook.yml | 1 - tasks/main.yml | 4 ++++ tasks/nsd.yml | 38 -------------------------------------- tasks/unbound.yml | 23 ----------------------- tasks/wireguard.yml | 1 - 6 files changed, 4 insertions(+), 66 deletions(-) delete mode 100644 meta/main.yml diff --git a/meta/main.yml b/meta/main.yml deleted file mode 100644 index a94d358..0000000 --- a/meta/main.yml +++ /dev/null @@ -1,3 +0,0 @@ ---- -dependencies: - - role: jnv.debian-backports diff --git a/playbook.yml b/playbook.yml index 3db623d..93bbf05 100644 --- a/playbook.yml +++ b/playbook.yml @@ -4,5 +4,4 @@ vars_files: - ./test_vars.yml roles: - - jnv.debian-backports - dns diff --git a/tasks/main.yml b/tasks/main.yml index 151310e..b4d5c83 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -26,6 +26,10 @@ group: root mode: 0644 +- name: Ensure repo are up-to-date + apt: + update_cache: yes + - include_tasks: wireguard.yml - include_tasks: nsd.yml diff --git a/tasks/nsd.yml b/tasks/nsd.yml index eb41239..254c3d9 100644 --- a/tasks/nsd.yml +++ b/tasks/nsd.yml @@ -1,42 +1,4 @@ --- -- name: Ensure bullseye backports apt sources are present - copy: - content: | - deb http://http.debian.net/debian testing main contrib - dest: /etc/apt/sources.list.d/testing.list - owner: root - group: root - mode: 0600 - register: testing_sources - -- name: Ensure nsd is taken from testing - copy: - content: | - Package: nsd - Pin: release a=testing - Pin-Priority: 999 - dest: /etc/apt/preferences.d/10-nsd-related - owner: root - group: root - mode: 0600 - register: repo_config - -- name: Ensure only nsd is taken from testing - copy: - content: | - Package: * - Pin: release a=stable - Pin-Priority: 700 - dest: /etc/apt/preferences.d/99-all-the-rest-from-stable - owner: root - group: root - mode: 0600 - -- name: Ensure repo are up-to-date - apt: - update_cache: yes - when: repo_config.changed or testing_sources.changed - - name: Ensure nsd is present apt: name: nsd diff --git a/tasks/unbound.yml b/tasks/unbound.yml index 08d0729..5349259 100644 --- a/tasks/unbound.yml +++ b/tasks/unbound.yml @@ -1,27 +1,4 @@ --- -- name: Ensure unbound is present - apt: - name: unbound - state: present - default_release: "{{ ansible_distribution_release }}-backports" - -- name: Ensure only unbound is taken from testing - copy: - content: | - Package: nsd - Pin: release a={{ ansible_distribution_release }}-backports - Pin-Priority: 998 - dest: /etc/apt/preferences.d/20-unbound-related - owner: root - group: root - mode: 0600 - register: repo_config_unbound - -- name: Ensure repo are up-to-date - apt: - update_cache: yes - when: repo_config_unbound.changed - - fail: msg: "Required nsd_addr is missing" when: server.nsd_addr is not defined diff --git a/tasks/wireguard.yml b/tasks/wireguard.yml index f4850f9..e9361d2 100644 --- a/tasks/wireguard.yml +++ b/tasks/wireguard.yml @@ -3,7 +3,6 @@ apt: name: wireguard-tools state: present - default_release: buster-backports register: wireguard - name: Ensure wireguard configuration is present