aboutsummaryrefslogtreecommitdiff
path: root/tasks
diff options
context:
space:
mode:
authorMitch Riedstra <mitch@riedstra.us>2019-02-23 22:38:41 -0500
committerMitch Riedstra <mitch@riedstra.us>2019-02-23 22:38:41 -0500
commit6d19a82a722f761293a578fbb5baa1741d6edaf0 (patch)
tree8c934ab0e0c5b8c24d3cb879a5cd0af576c9d0eb /tasks
downloadnginx-6d19a82a722f761293a578fbb5baa1741d6edaf0.tar.gz
nginx-6d19a82a722f761293a578fbb5baa1741d6edaf0.tar.xz
Import
Diffstat (limited to 'tasks')
-rw-r--r--tasks/main.yml50
1 files changed, 50 insertions, 0 deletions
diff --git a/tasks/main.yml b/tasks/main.yml
new file mode 100644
index 0000000..fb3047e
--- /dev/null
+++ b/tasks/main.yml
@@ -0,0 +1,50 @@
+---
+# - name: Install Nginx
+# xbps:
+# name: nginx
+# state: present
+- name: Enable Nginx
+ file:
+ src: /etc/sv/nginx
+ dest: /var/service/nginx
+ owner: root
+ group: root
+ state: link
+- name: Lock down and setup configuration directories
+ file:
+ path: '{{item}}'
+ state: directory
+ owner: "{{nginx_conf_owner}}"
+ group: "{{nginx_conf_group}}"
+ mode: "{{nginx_conf_dir_mode}}"
+ loop:
+ - /etc/nginx
+ - /etc/nginx/conf.d
+- name: Create Acme Challenge directory
+ file:
+ path: /var/lib/acme-challenge
+ state: directory
+ owner: "{{nginx_conf_owner}}"
+ group: "{{nginx_conf_group}}"
+ mode: "0755"
+- name: Install Main 'nginx.conf'
+ template:
+ src: nginx/nginx.conf
+ dest: /etc/nginx/nginx.conf
+ owner: "{{nginx_conf_owner}}"
+ group: "{{nginx_conf_group}}"
+ mode: "{{nginx_conf_file_mode}}"
+ notify:
+ - Restart Nginx
+- name: Install Other Nginx templates
+ template:
+ src: "nginx/{{item}}"
+ dest: "/etc/nginx/{{item}}"
+ owner: "{{nginx_conf_owner}}"
+ group: "{{nginx_conf_group}}"
+ mode: "{{nginx_conf_file_mode}}"
+ loop:
+ - acme-challenge
+ - acl
+ notify:
+ - Restart Nginx