summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--defaults/main.yml8
-rw-r--r--tasks/main.yml26
-rw-r--r--templates/nginx.j26
3 files changed, 20 insertions, 20 deletions
diff --git a/defaults/main.yml b/defaults/main.yml
index e5a14d3..e97d316 100644
--- a/defaults/main.yml
+++ b/defaults/main.yml
@@ -10,8 +10,8 @@ nginx_enable_http2: true
nginx_cache_static: true
nginx_ssl: false
-certbot_webroot: /var/www/letsencrypt
-letsencrypt_domain: "{{ nginx_domain }}"
+nginx_certbot_webroot: /var/www/letsencrypt
+nginx_letsencrypt_domain: "{{ nginx_domain }}"
-upload_user: ssh-http-upload
-upload_group: www-data
+nginx_upload_user: ssh-http-upload
+nginx_upload_group: www-data
diff --git a/tasks/main.yml b/tasks/main.yml
index 14ff81e..4ffde51 100644
--- a/tasks/main.yml
+++ b/tasks/main.yml
@@ -1,31 +1,31 @@
---
# tasks file for MicroJoe.staticwebsite
-- name: Make sure {{ upload_user }} user exists
+- name: Make sure {{ nginx_upload_user }} user exists
user:
- name: "{{ upload_user }}"
- group: "{{ upload_group }}"
+ name: "{{ nginx_upload_user }}"
+ group: "{{ nginx_upload_group }}"
-- name: Make sure {{ upload_user }} has .ssh directory
+- name: Make sure {{ nginx_upload_user }} has .ssh directory
file:
- path: "/home/{{ upload_user }}/.ssh"
+ path: "/home/{{ nginx_upload_user }}/.ssh"
state: directory
- owner: "{{ upload_user }}"
- group: "{{ upload_group }}"
+ owner: "{{ nginx_upload_user }}"
+ group: "{{ nginx_upload_group }}"
-- name: Make sure {{ upload_user }} has .ssh/authorized_keys file
+- name: Make sure {{ nginx_upload_user }} has .ssh/authorized_keys file
copy:
src: ~/.ssh/id_rsa.pub
- dest: "/home/{{ upload_user }}/.ssh/authorized_keys"
- owner: "{{ upload_user }}"
- group: "{{ upload_group }}"
+ dest: "/home/{{ nginx_upload_user }}/.ssh/authorized_keys"
+ owner: "{{ nginx_upload_user }}"
+ group: "{{ nginx_upload_group }}"
- name: Make sure root directory {{ nginx_root }} exists
file:
path: "{{ nginx_root }}"
state: directory
- owner: "{{ upload_user }}"
- group: "{{ upload_group }}"
+ owner: "{{ nginx_upload_user }}"
+ group: "{{ nginx_upload_group }}"
- name: Install nginx configuration file {{ nginx_filename }}
template:
diff --git a/templates/nginx.j2 b/templates/nginx.j2
index 6654bdd..bca69ac 100644
--- a/templates/nginx.j2
+++ b/templates/nginx.j2
@@ -9,7 +9,7 @@ server {
error_log /var/log/nginx/{{ nginx_domain }}.error.log;
location ^~ /.well-known/acme-challenge {
- root {{ certbot_webroot }};
+ root {{ nginx_certbot_webroot }};
}
{% if nginx_ssl %}
@@ -27,8 +27,8 @@ server {
error_log /var/log/nginx/{{ nginx_domain }}.error.log;
ssl on;
- ssl_certificate /etc/letsencrypt/live/{{ letsencrypt_domain }}/fullchain.pem;
- ssl_certificate_key /etc/letsencrypt/live/{{ letsencrypt_domain }}/privkey.pem;
+ ssl_certificate /etc/letsencrypt/live/{{ nginx_letsencrypt_domain }}/fullchain.pem;
+ ssl_certificate_key /etc/letsencrypt/live/{{ nginx_letsencrypt_domain }}/privkey.pem;
include /etc/nginx/snippets/ssl.conf;