Replace ingress proxy with nginx
This enables HTTPS redirecting at it too much more easily, and matches the gateway configuration. Requires using upstream versions of nginx to enable https://nginx.org/en/docs/stream/ngx_stream_realip_module.html
This commit is contained in:
@ -1,20 +0,0 @@
|
||||
- name: Install Haproxy
|
||||
package:
|
||||
name: haproxy
|
||||
become: true
|
||||
|
||||
- name: Haproxy config
|
||||
template:
|
||||
src: files/haproxy.cfg
|
||||
dest: /etc/haproxy/haproxy.cfg
|
||||
validate: /usr/sbin/haproxy -c -- %s
|
||||
mode: "0644"
|
||||
backup: yes
|
||||
become: true
|
||||
notify: restart haproxy
|
||||
|
||||
- name: Enable Haproxy
|
||||
service:
|
||||
name: haproxy
|
||||
enabled: true
|
||||
become: true
|
@ -1,5 +1,5 @@
|
||||
- name: Configure wireguard
|
||||
include: wireguard.yml
|
||||
|
||||
- name: Configure haproxy
|
||||
include: haproxy.yml
|
||||
- name: Configure nginx
|
||||
include: nginx.yml
|
||||
|
19
ansible/roles/ingress/tasks/nginx.yml
Normal file
19
ansible/roles/ingress/tasks/nginx.yml
Normal file
@ -0,0 +1,19 @@
|
||||
- name: Install nginx
|
||||
package:
|
||||
name: nginx
|
||||
become: true
|
||||
|
||||
- name: Nginx config
|
||||
template:
|
||||
src: files/nginx.conf
|
||||
dest: /etc/nginx/nginx.conf
|
||||
validate: nginx -t -c %s
|
||||
mode: "0644"
|
||||
become: true
|
||||
notify: restart nginx
|
||||
|
||||
- name: Enable nginx
|
||||
service:
|
||||
name: nginx
|
||||
enabled: true
|
||||
become: true
|
Reference in New Issue
Block a user