- name: Add Caddy GPG key apt_key: url: "https://dl.cloudsmith.io/public/caddy/stable/gpg.key" state: present - name: Add Caddy repositories apt_repository: repo: "{{ item }} https://dl.cloudsmith.io/public/caddy/stable/deb/debian any-version main" filename: 'caddy-stable' state: present with_items: - deb - deb-src - name: Install Caddy apt: name: caddy state: present