{% 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 - enable: True write caddy config file: file.managed: - name: /etc/caddy/Caddyfile - source: salt://caddy/Caddyfile.jinja - template: jinja