Moving proxy things to its own playbook + role
This commit is contained in:
15
ansible/roles/proxy/files/host-file
Normal file
15
ansible/roles/proxy/files/host-file
Normal file
@@ -0,0 +1,15 @@
|
||||
127.0.0.1 localhost
|
||||
127.0.1.1 nigel
|
||||
|
||||
# Our own dns stuff
|
||||
127.0.1.1 nigel.local
|
||||
127.0.1.1 nomad.nigel.local
|
||||
127.0.1.1 sanity.nigel.local
|
||||
127.0.1.1 ncr.nigel.local
|
||||
|
||||
# The following lines are desirable for IPv6 capable hosts
|
||||
::1 ip6-localhost ip6-loopback
|
||||
fe00::0 ip6-localnet
|
||||
ff00::0 ip6-mcastprefix
|
||||
ff02::1 ip6-allnodes
|
||||
ff02::2 ip6-allrouters
|
||||
6
ansible/roles/proxy/files/ncr.conf
Normal file
6
ansible/roles/proxy/files/ncr.conf
Normal file
@@ -0,0 +1,6 @@
|
||||
server {
|
||||
server_name ncr.nigel.local;
|
||||
location / {
|
||||
proxy_pass http://localhost:5000;
|
||||
}
|
||||
}
|
||||
25
ansible/roles/proxy/files/nomad.conf
Normal file
25
ansible/roles/proxy/files/nomad.conf
Normal file
@@ -0,0 +1,25 @@
|
||||
server {
|
||||
server_name nomad.nigel.local;
|
||||
location / {
|
||||
proxy_pass http://nomad-ws;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
proxy_read_timeout 319s;
|
||||
|
||||
# This is for log streaming requests
|
||||
proxy_buffering off;
|
||||
|
||||
# Upgrade and Connection headers for upgrading to websockets
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
|
||||
|
||||
proxy_set_header Origin "${scheme}://${proxy_host}";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
upstream nomad-ws {
|
||||
ip_hash;
|
||||
server nomad.nigel.local:4646;
|
||||
}
|
||||
Reference in New Issue
Block a user