--- - 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/netcup environment: PATH: "{{ ansible_env.PATH }}:/usr/local/go/bin" register: xcaddy_build failed_when: xcaddy_build.rc != 0