caddy-formula/caddy/init.sls
2024-06-24 14:55:23 +02:00

20 lines
504 B
Text

{% if grains['os'] == 'Ubuntu' %}
caddy repository available:
pkgrepo.managed:
- name: deb https://dl.cloudsmith.io/public/caddy/stable/deb/debian any-version main
- key_url: https://dl.cloudsmith.io/public/caddy/stable/gpg.key
{% endif %}
caddy installed:
pkg.installed:
- name: caddy
caddy service running:
service.running:
- name: caddy
write caddy config file:
file.managed:
- name: /etc/caddy/Caddyfile
- source: salt://caddy/Caddyfile.jinja
- template: jinja