20 lines
839 B
YAML
20 lines
839 B
YAML
---
|
|
- name: Fail if vhost_redirect_target is a relative path and vhost_redirect_preserve_path is true
|
|
ansible.builtin.fail:
|
|
msg: vhost_redirect_target must be an absolute url or absolute path if vhost_redirect_preserve_path is true
|
|
when:
|
|
- vhost_redirect_preserve_path
|
|
- vhost_redirect_target.split('://') | length < 2
|
|
- not vhost_redirect_target.startswith('/')
|
|
|
|
- name: Fail if vhost_redirect_target ends with / and vhost_redirect_preserve_path is true
|
|
ansible.builtin.fail:
|
|
msg: vhost_redirect_target must not end with / if vhost_redirect_preserve_path is true
|
|
when:
|
|
- vhost_redirect_preserve_path
|
|
- vhost_redirect_target.endswith('/')
|
|
|
|
- name: "Setup {{ vhost_id + ' vhost on ' + vhost_web_server }}"
|
|
ansible.builtin.include_tasks: "{{ vhost_web_server }}.yaml"
|
|
when: vhost_web_server != 'none'
|