diff options
| author | Kumar Damani <me@kumardamani.net> | 2024-08-20 15:38:25 +0000 |
|---|---|---|
| committer | Kumar Damani <me@kumardamani.net> | 2024-08-20 15:38:25 +0000 |
| commit | 8c4687240ec4b119f5c0544966c16bd9609a9559 (patch) | |
| tree | a8619745b3d7c0879f250863163d275dde4118bc | |
| parent | 4b330521fd25fc562485a17d7d522030803c1649 (diff) | |
bug fix - new caddy routes fail to add
| -rw-r--r-- | ansible/roles/caddy_add/tasks/main.yaml | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ansible/roles/caddy_add/tasks/main.yaml b/ansible/roles/caddy_add/tasks/main.yaml index 80382d4..cc93518 100644 --- a/ansible/roles/caddy_add/tasks/main.yaml +++ b/ansible/roles/caddy_add/tasks/main.yaml @@ -14,7 +14,7 @@ - name: 'Call the Caddy API to add our new host' ansible.builtin.uri: - url: 'http://rproxy:2019/config/apps/http/servers/serv0/routes' + url: 'http://rproxy:2019/config/apps/http/servers/serv0/routes/0' method: 'PUT' body_format: 'json' status_code: 200 @@ -56,6 +56,7 @@ - name: 'Save the new config to file' delegate_to: 'localhost' + when: 'not ansible_check_mode' ansible.builtin.copy: dest: 'artifacts/caddy/{{ _file_name }}' content: '{{ _current_conf.json }}' |
