Skip to content

Commit

Permalink
fix(caddy_server): fix install on existing systems (3)
Browse files Browse the repository at this point in the history
  • Loading branch information
maxhoesel committed May 20, 2022
1 parent 4349389 commit 64b290b
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions roles/caddy_server/tasks/install_debian.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,17 @@
---
- name: Old apt-key trusted key is absent
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:
name:
- debian-keyring
- debian-archive-keyring
- apt-transport-https
- "{{ 'python3-requests' if ansible_python_version is version('3', '>=') else 'python-requests' }}"
update_cache: yes

- name: Old apt-key trusted key is absent
ansible.builtin.apt_key:
id: 65760C51EDEA2017CEA2CA15155B6D79CA56EA34
state: absent
register: old_install_present

- name: APT Key is stored in keyring
ansible.builtin.apt_key:
Expand Down

0 comments on commit 64b290b

Please sign in to comment.