aboutsummaryrefslogtreecommitdiff
path: root/roles/personal/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/personal/tasks/main.yml')
-rw-r--r--roles/personal/tasks/main.yml39
1 files changed, 39 insertions, 0 deletions
diff --git a/roles/personal/tasks/main.yml b/roles/personal/tasks/main.yml
new file mode 100644
index 0000000..6a9b7c7
--- /dev/null
+++ b/roles/personal/tasks/main.yml
@@ -0,0 +1,39 @@
1---
2- block:
3 - name: Ensure personal web root exists
4 ansible.builtin.file:
5 path: /srv/http/michalec.dev
6 state: directory
7 owner: cmmm
8 group: www-data
9 mode: '0775'
10
11 - name: Ensure nginx site modular directory exists
12 ansible.builtin.file:
13 path: /etc/nginx/http.d/michalec.dev.d
14 state: directory
15 owner: root
16 group: root
17 mode: '0755'
18
19 - name: Deploy personal nginx site configuration
20 ansible.builtin.template:
21 src: nginx.conf.j2
22 dest: /etc/nginx/http.d/personal.conf
23 owner: root
24 group: root
25 mode: '0444'
26 validate: nginx-validate %s /etc/nginx/http.d/personal.conf
27 notify: Reload nginx
28
29 - name: Deploy personal nginx htpasswd
30 ansible.builtin.template:
31 src: htpasswd.j2
32 dest: /etc/nginx/htpasswd
33 owner: root
34 group: nginx
35 mode: '0440'
36 notify: Reload nginx
37
38 tags:
39 - personal