Browse Source

better ssl handling

mhkarimi1383/master
Muhammed Hussein Karimi 3 years ago
parent
commit
177a9598ea
  1. 1
      ansible/.gitignore
  2. 9
      ansible/README.md
  3. 2
      ansible/roles/nginx/files/README.md
  4. 4
      ansible/roles/nginx/tasks/main.yml

1
ansible/.gitignore

@ -0,0 +1 @@
roles/nginx/files/ssl/*

9
ansible/README.md

@ -12,8 +12,15 @@ I will try to make this readme better
## To run it
1. run `ansible-galaxy install -r ansible-requirements.yml` to get requirements
2. prepare inventory hosts
3. to run playbook
3. put your certificates in files section in nginx role with this structure below:
```
ansible -> roles -> nginx -> ssl -> <uptime kuma domain>.fullchain.pem
ansible -> roles -> nginx -> ssl -> <uptime kuma domain>.privkey.pem
```
4. 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
> Note: Replace `<uptime kuma domain>` with your desired domain for uptime kuma

2
ansible/roles/nginx/files/README.md

@ -1,2 +0,0 @@
## Your ssl certs will go here
put them in ssl directory see nginx.conf for more info

4
ansible/roles/nginx/tasks/main.yml

@ -17,8 +17,8 @@
- name: Ensure nginx config directory exist
copy:
src: nginx
dest: /compose/volumes/nginx/
src: ssl
dest: /compose/volumes/nginx/ssl
mode: 'preserve'
group: root
owner: root

Loading…
Cancel
Save