From dff1cbe96152f92d73cb0c0b2a6f635938a57d81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20H=C3=B6sel?= Date: Fri, 20 May 2022 13:48:51 +0200 Subject: [PATCH] fix(caddy_server): fix install on existing systems (2) --- roles/caddy_server/tasks/install_debian.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/roles/caddy_server/tasks/install_debian.yml b/roles/caddy_server/tasks/install_debian.yml index bd8b8dc..4892a75 100644 --- a/roles/caddy_server/tasks/install_debian.yml +++ b/roles/caddy_server/tasks/install_debian.yml @@ -3,6 +3,13 @@ ansible.builtin.apt_key: id: 65760C51EDEA2017CEA2CA15155B6D79CA56EA34 state: absent + register: old_install_present + +- name: Temporarily remove caddy repository to cleanup old key install method # noqa no-handler + ansible.builtin.file: + path: /etc/apt/sources.list.d/caddy-stable.list + state: absent + when: old_install_present.changed - name: Requirements are installed ansible.builtin.package: