diff --git a/ansible/.gitignore b/ansible/.gitignore new file mode 100644 index 0000000..ec2ba68 --- /dev/null +++ b/ansible/.gitignore @@ -0,0 +1 @@ +roles/nginx/files/ssl/* diff --git a/ansible/README.md b/ansible/README.md index fd255f5..659f56c 100644 --- a/ansible/README.md +++ b/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 -> .fullchain.pem +ansible -> roles -> nginx -> ssl -> .privkey.pem +``` +4. to run playbook ```bash ansible-playbook ./playbook.yml -i --extra-vars "kuma_domain=" ``` you can use other ansible playbook options too + +> Note: Replace `` with your desired domain for uptime kuma diff --git a/ansible/roles/nginx/files/README.md b/ansible/roles/nginx/files/README.md deleted file mode 100644 index 71f9148..0000000 --- a/ansible/roles/nginx/files/README.md +++ /dev/null @@ -1,2 +0,0 @@ -## Your ssl certs will go here -put them in ssl directory see nginx.conf for more info \ No newline at end of file diff --git a/ansible/roles/nginx/tasks/main.yml b/ansible/roles/nginx/tasks/main.yml index 2b7b08a..11ca80f 100644 --- a/ansible/roles/nginx/tasks/main.yml +++ b/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