ansible-role-nginx-config-dual/vars/main.yml

18 lines
657 B
YAML
Raw Normal View History

2023-06-14 22:42:55 +00:00
---
next_role: re.nemunai.nginx-config-svc
2024-07-07 12:07:51 +00:00
unsecure_server: |
location @{{ instance_name | default(ansible_play_name) | replace(" ", "_") }}_neighbor {
proxy_pass http://{{ neighbor.host }};
{% if "target" in neighbor %}proxy_set_header Host {{ neighbor.target }};{% endif %}
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location / {
# enforce https
return 301 https://$server_name:443$request_uri;
}
nginx_acme_challenge: |
try_files $uri $uri/ @{{ instance_name | default(ansible_play_name) | replace(" ", "_") }}_neighbor;