caddy: Ensure apt repository not present on recent distro releases
This commit is contained in:
@@ -4,6 +4,14 @@
|
||||
path: /etc/apt/sources.list.d/caddy-stable.list
|
||||
state: absent
|
||||
|
||||
- name: Ensure caddy apt repository not present
|
||||
ansible.builtin.file:
|
||||
path: /etc/apt/sources.list.d/caddy-stable.list
|
||||
state: absent
|
||||
when: >
|
||||
(ansible_facts.distribution == 'Debian' and ansible_facts.distribution_major_version | int > 11) or
|
||||
(ansible_facts.distribution == 'Ubuntu' and ansible_facts.distribution_major_version | int >= 24)
|
||||
|
||||
- name: Add caddy apt repository
|
||||
ansible.builtin.deb822_repository:
|
||||
name: caddy-stable
|
||||
|
||||
Reference in New Issue
Block a user