mirror of
https://gitlab.archlinux.org/archlinux/infrastructure.git
synced 2026-09-19 19:09:12 +02:00
these are all the systems that the new redirect snippet can be cleanly applied to. there are a few others not included, that will need a more manual approach: - gitlab (multiple domains) - mta.sts(multiple domains) - archweb(mutltiple domains, snippets) - buildbtw(dynamic dev domains) - redirects(different structure) - public html(multiple domains) - archweb maintenence(different structure) - maintenence(different structure) some of these might be solvable by tweaking the snippet to accept multiple domains. I'll look into this Co-authored-by: Christian Heusel <christian@heusel.eu>
16 lines
610 B
YAML
16 lines
610 B
YAML
- name: Setup HTTP redirect
|
|
include_role:
|
|
name: http_redirect
|
|
vars:
|
|
domain: "mta-sts.{{ (mta_sts | map(attribute='domains') | flatten)[0] }}"
|
|
additional_domains: "{{ (mta_sts | map(attribute='domains') | flatten | map('regex_replace', '^', 'mta-sts.'))[1:] }}"
|
|
|
|
- name: Make nginx log dir
|
|
file: path=/var/log/nginx/{{ "mta-sts." + item.domains | first }} state=directory owner=root group=root mode=0755
|
|
loop: "{{ mta_sts }}"
|
|
|
|
- name: Set up nginx
|
|
template: src=nginx.d.conf.j2 dest="/etc/nginx/nginx.d/mta-sts.conf" owner=root group=root mode=644
|
|
notify: Reload nginx
|
|
tags: ['nginx']
|