using variables for domain and guid to run added to readme

pull/662/head
Muhammed Hussein Karimi 3 years ago
parent e0e5f3518a
commit 90ebf4f66c

@ -9,5 +9,11 @@ This playbook comes with three roles
To see more info see docker-compose, tasks and config files To see more info see docker-compose, tasks and config files
I will try to make this readme better I will try to make this readme better
## To run it
> Replace status.yoursite with your domain name 1. run `ansible-galaxy install -r ansible-requirements.yml` to get requirements
2. prepare inventory hosts
3. to run playbook
```bash
ansible-playbook ./playbook.yml -i <your inventory path> --extra-vars "kuma_domain=<uptime kuma domain>"
```
you can use other ansible playbook options too

@ -20,8 +20,8 @@ http {
### SSL Settings for all servers (https://ssl-config.mozilla.org/#server=nginx&server-version=1.17.2&config=intermediate) ### SSL Settings for all servers (https://ssl-config.mozilla.org/#server=nginx&server-version=1.17.2&config=intermediate)
# certs sent to the client in SERVER HELLO are concatenated in ssl_certificate # certs sent to the client in SERVER HELLO are concatenated in ssl_certificate
ssl_certificate /etc/nginx/ssl/status.yoursite.fullchain.pem; ssl_certificate /etc/nginx/ssl/{{ kuma_domain }}.fullchain.pem;
ssl_certificate_key /etc/nginx/ssl/status.yoursite.privkey.pem; ssl_certificate_key /etc/nginx/ssl/{{ kuma_domain }}.privkey.pem;
ssl_session_timeout 1d; ssl_session_timeout 1d;
ssl_session_cache shared:MozSSL:10m; # about 40000 sessions ssl_session_cache shared:MozSSL:10m; # about 40000 sessions
ssl_session_tickets off; ssl_session_tickets off;
@ -59,12 +59,12 @@ http {
# Redirect HTTP request to HTTPS # Redirect HTTP request to HTTPS
server { server {
listen 80 default_server; listen 80 default_server;
server_name status.yoursite; server_name {{ kuma_domain }};
return 302 https://$host$request_uri; return 302 https://$host$request_uri;
} }
server { server {
server_name status.yoursite; server_name {{ kuma_domain }};
listen 443 ssl http2 default_server; listen 443 ssl http2 default_server;
access_log /var/log/nginx/yoursite.access.log main; access_log /var/log/nginx/yoursite.access.log main;

Loading…
Cancel
Save