Initial commit
This commit is contained in:
commit
7a1897b0cb
6
defaults/main.yml
Normal file
6
defaults/main.yml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
path: /
|
||||||
|
error_pages:
|
||||||
|
404: /404.html
|
||||||
|
notls: false
|
||||||
|
rewrite: []
|
18
meta/main.yml
Normal file
18
meta/main.yml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
---
|
||||||
|
|
||||||
|
dependencies: []
|
||||||
|
|
||||||
|
galaxy_info:
|
||||||
|
role_name: nginx-config-dual
|
||||||
|
author: 'Pierre-Olivier Mercier <nemunaire+iac@nemunai.re>'
|
||||||
|
description: Abstraction to configure nginx server for a domain shared with multiple hosts
|
||||||
|
license: GPL-3.0-or-later
|
||||||
|
min_ansible_version: 2.9
|
||||||
|
platforms:
|
||||||
|
- name: Alpine
|
||||||
|
versions:
|
||||||
|
- all
|
||||||
|
- name: Debian
|
||||||
|
versions:
|
||||||
|
- all
|
||||||
|
galaxy_tags: []
|
19
tasks/main.yml
Normal file
19
tasks/main.yml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
---
|
||||||
|
- ansible.builtin.set_fact:
|
||||||
|
unsecure_server: |
|
||||||
|
location @{{ instance_name | default(ansible_play_name) | replace(" ", "_") }}_neighbor {
|
||||||
|
proxy_pass http://{{ neighbor.host }};
|
||||||
|
proxy_set_header Host {{ neighbor.target }};
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
}
|
||||||
|
nginx_acme_challenge: |
|
||||||
|
try_files $uri $uri/ @{{ instance_name | default(ansible_play_name) | replace(" ", "_") }}_neighbor;
|
||||||
|
|
||||||
|
- ansible.builtin.set_fact:
|
||||||
|
onlyifnotexist: true
|
||||||
|
server: ""
|
||||||
|
when: notls
|
||||||
|
|
||||||
|
- ansible.builtin.include_role:
|
||||||
|
name: "{{ next_role }}"
|
2
vars/main.yml
Normal file
2
vars/main.yml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
next_role: re.nemunai.nginx-config-svc
|
Loading…
Reference in New Issue
Block a user