Switch caddy to use json configuration

This commit is contained in:
Marty Oehme 2021-07-31 17:26:06 +02:00
parent bebdf72b19
commit 79c704c1f9
Signed by: Marty
GPG key ID: B7538B8F50A1C800
6 changed files with 86 additions and 34 deletions

View file

@ -12,9 +12,9 @@
- name: Ensure Caddyfile exists
ansible.builtin.template:
src: Caddyfile.j2
dest: "{{ caddy_caddyfile_dir }}/Caddyfile"
validate: "docker run --rm -v %s:/Caddyfile caddy caddy validate --config /Caddyfile"
src: config.json.j2
dest: "{{ caddy_caddyfile_dir }}/config.json"
validate: "docker run --rm -v %s:/config.json peterdavehello/jsonlint jsonlint -q /config.json"
become: true
tags:
- fs