Files
ansible/roles/reverse_proxy/tasks/20_xcaddy_install.yml
Tuan-Dat Tran 9cb90a8020 feat(caddy): netcup->cf
Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
2025-10-25 09:25:40 +02:00

33 lines
910 B
YAML

---
- name: Download xCaddy GPG key
ansible.builtin.get_url:
url: "https://dl.cloudsmith.io/public/caddy/xcaddy/gpg.key"
dest: /etc/apt/keyrings/caddy-xcaddy.asc
mode: "0644"
become: true
- name: Add xCaddy repository to apt sources
ansible.builtin.apt_repository:
repo: "deb [signed-by=/etc/apt/keyrings/caddy-xcaddy.asc] https://dl.cloudsmith.io/public/caddy/xcaddy/deb/debian any-version main"
state: present
update_cache: true
become: true
- name: Update apt cache
ansible.builtin.apt:
update_cache: true
become: true
- name: Install xCaddy
ansible.builtin.apt:
name: xcaddy
state: present
become: true
- name: Build Custom Caddy with netcup
ansible.builtin.command: xcaddy build --with github.com/caddy-dns/cloudflare
environment:
PATH: "{{ ansible_env.PATH }}:/usr/local/go/bin"
register: xcaddy_build
failed_when: xcaddy_build.rc != 0