nexus stuff
This commit is contained in:
parent
473bedc5e9
commit
94d50a5072
14
host_vars/nexus.yaml
Normal file
14
host_vars/nexus.yaml
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
webserver:
|
||||||
|
defaultservername: nexus.kmlabz.com
|
||||||
|
customrule: |
|
||||||
|
server {
|
||||||
|
listen 443 ssl http2;
|
||||||
|
listen [::]:443 ssl http2;
|
||||||
|
server_name registry.kmlabz.com;
|
||||||
|
ssl_certificate /etc/ssl/certs/ssl-cert-snakeoil.pem;
|
||||||
|
ssl_certificate_key /etc/ssl/private/ssl-cert-snakeoil.key;
|
||||||
|
location /{
|
||||||
|
proxy_pass http://127.0.0.1:8080;
|
||||||
|
}
|
||||||
|
}
|
3
roles/webserver/defaults/main.yaml
Normal file
3
roles/webserver/defaults/main.yaml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
webserver:
|
||||||
|
customrule: ""
|
||||||
|
defaultservername: "_"
|
@ -12,13 +12,13 @@
|
|||||||
state: restarted
|
state: restarted
|
||||||
enabled: yes
|
enabled: yes
|
||||||
|
|
||||||
- name: Upload site config to destination
|
- name: "Generate nginx configuration"
|
||||||
copy:
|
ansible.builtin.template:
|
||||||
src: nginx.conf
|
src: nginx.conf
|
||||||
dest: /etc/nginx/nginx.conf
|
dest: /etc/nginx/nginx.conf
|
||||||
mode: 644
|
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
|
mode: '0644'
|
||||||
|
|
||||||
- name: Reload nginx daemon
|
- name: Reload nginx daemon
|
||||||
service:
|
service:
|
||||||
|
@ -54,6 +54,8 @@ http {
|
|||||||
proxy_buffering off;
|
proxy_buffering off;
|
||||||
proxy_request_buffering off;
|
proxy_request_buffering off;
|
||||||
|
|
||||||
|
{{webserver.customrule}}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
|
|
||||||
listen 80 default_server;
|
listen 80 default_server;
|
||||||
@ -65,7 +67,7 @@ http {
|
|||||||
server {
|
server {
|
||||||
listen 443 ssl http2;
|
listen 443 ssl http2;
|
||||||
listen [::]:443 ssl http2;
|
listen [::]:443 ssl http2;
|
||||||
server_name _;
|
server_name {{webserver.defaultservername}};
|
||||||
ssl_certificate /etc/ssl/certs/ssl-cert-snakeoil.pem;
|
ssl_certificate /etc/ssl/certs/ssl-cert-snakeoil.pem;
|
||||||
ssl_certificate_key /etc/ssl/private/ssl-cert-snakeoil.key;
|
ssl_certificate_key /etc/ssl/private/ssl-cert-snakeoil.key;
|
||||||
location /{
|
location /{
|
Loading…
Reference in New Issue
Block a user