2021-10-20 10:22:03 +02:00
|
|
|
---
|
2024-01-08 11:20:44 +01:00
|
|
|
- name: "include task receive certbot certificate"
|
2025-02-15 17:43:36 +01:00
|
|
|
include_role:
|
2025-02-21 09:28:01 +01:00
|
|
|
name: nginx-https-get-cert
|
2024-01-08 11:20:44 +01:00
|
|
|
vars:
|
2024-01-08 19:35:01 +01:00
|
|
|
domain: "{{item.source}}"
|
|
|
|
loop: "{{domain_mappings}}"
|
2021-10-20 10:22:03 +02:00
|
|
|
|
2025-02-03 22:08:16 +01:00
|
|
|
- name: The domains for which a www. redirect will be implemented
|
|
|
|
debug:
|
|
|
|
var: domain_mappings
|
2025-02-05 12:53:06 +01:00
|
|
|
when: enable_debug | bool
|
2025-02-03 22:08:16 +01:00
|
|
|
|
2021-10-20 10:22:03 +02:00
|
|
|
- name: configure nginx redirect configurations
|
|
|
|
vars:
|
2025-02-03 22:08:16 +01:00
|
|
|
item: "{{item}}"
|
2024-01-08 19:35:01 +01:00
|
|
|
template:
|
|
|
|
src: redirect.domain.nginx.conf.j2
|
2025-02-03 22:08:16 +01:00
|
|
|
dest: "{{nginx.directories.http.servers}}{{item.source}}.conf"
|
|
|
|
loop: "{{domain_mappings}}"
|
2021-10-20 10:22:03 +02:00
|
|
|
notify: restart nginx
|