Files
ansible/roles/reverse_proxy/tasks/10_caddy_install.yaml
Tuan-Dat Tran ef652fac20 refactor: yml -> yaml
Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
2025-11-07 20:44:14 +01:00

24 lines
787 B
YAML

---
- name: Download Caddy GPG Key
ansible.builtin.get_url:
url: https://dl.cloudsmith.io/public/caddy/stable/gpg.key
dest: /usr/share/keyrings/caddy-stable-archive-keyring.asc
mode: "0644"
become: true
- name: Add Caddy repository source list
ansible.builtin.apt_repository:
repo: "{{ item }}"
state: present
become: true
notify: Update apt cache
loop:
- "deb [signed-by=/usr/share/keyrings/caddy-stable-archive-keyring.asc] https://dl.cloudsmith.io/public/caddy/stable/deb/debian any-version main"
- "deb-src [signed-by=/usr/share/keyrings/caddy-stable-archive-keyring.asc] https://dl.cloudsmith.io/public/caddy/stable/deb/debian any-version main"
- name: Install Caddy
ansible.builtin.apt:
name: caddy
state: present
become: true