caddy: use apt_repository role

This commit is contained in:
uumas
2023-09-04 00:51:35 +03:00
parent 01182d07e6
commit fa7288bc7b

View File

@@ -1,22 +1,15 @@
---
- name: Install dependencies
apt:
name:
- debian-keyring
- debian-archive-keyring
- apt-transport-https
update_cache: true
- name: Add caddy repo signing key
apt_key:
id: '65760C51EDEA2017CEA2CA15155B6D79CA56EA34'
url: 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key'
- name: Add caddy repo
apt_repository:
repo: "deb https://dl.cloudsmith.io/public/caddy/stable/deb/debian any-version main"
filename: 'caddy-stable'
mode: '644'
- name: Add caddy apt repository
ansible.builtin.import_role:
name: apt_repository
vars:
repo_name: caddy-stable
repo_url: https://dl.cloudsmith.io/public/caddy/stable/deb/debian
repo_key_url: https://dl.cloudsmith.io/public/caddy/stable/gpg.key
repo_suite: any-version
repo_components:
- main
- name: Install caddy
apt: