formatting
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
---
|
||||
|
||||
- name: Add caddy vhost config
|
||||
blockinfile:
|
||||
ansible.builtin.blockinfile:
|
||||
path: /etc/caddy/Caddyfile
|
||||
marker: "# {mark} ANSIBLE MANAGED BLOCK {{ vhost_id }}"
|
||||
block: |
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
---
|
||||
|
||||
- name: Fail if redirect_target is a relative path and redirect_preserve_path is true
|
||||
fail:
|
||||
ansible.builtin.fail:
|
||||
msg: redirect_target must be an absolute url or absolute path if redirect_preserve_path is true
|
||||
when:
|
||||
- redirect_preserve_path
|
||||
@@ -9,17 +9,17 @@
|
||||
- not redirect_target.startswith('/')
|
||||
|
||||
- name: Fail if redirect_tartget ends with / and redirect_preserve_path is true
|
||||
fail:
|
||||
ansible.builtin.fail:
|
||||
msg: redirect_target must not end with / if redirect_preserve_path is true
|
||||
when:
|
||||
- redirect_preserve_path
|
||||
- redirect_target.endswith('/')
|
||||
|
||||
- name: Reset vhost_locations_all
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
vhost_locations_all: []
|
||||
- name: Set vhost_locations_all reverse proxies
|
||||
set_fact:
|
||||
ansible.builtin.set_fact:
|
||||
vhost_locations_all: >
|
||||
{{ vhost_locations_all + [{
|
||||
'path': item.path,
|
||||
@@ -43,5 +43,5 @@
|
||||
loop: "{{ vhost_locations + [{'path': ''}] }}"
|
||||
|
||||
- name: "Setup {{ vhost_id + ' vhost on ' + web_server }}"
|
||||
include_tasks: "{{ web_server }}.yml"
|
||||
ansible.builtin.include_tasks: "{{ web_server }}.yml"
|
||||
when: web_server != 'none'
|
||||
|
||||
Reference in New Issue
Block a user