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: