summaryrefslogtreecommitdiff
path: root/roles/home/tasks
diff options
context:
space:
mode:
authorDmitry Ilvokhin <d@ilvokhin.com>2024-01-13 17:38:13 +0000
committerDmitry Ilvokhin <d@ilvokhin.com>2024-01-13 17:38:13 +0000
commit25d355fdc48e1630d7847d7238b1dd49f2e618a4 (patch)
tree441c31b25c678cd2865ba89bb1b874a83060620b /roles/home/tasks
parent2c04195a35fb2a425abfd0c6f0ce218176ed711e (diff)
downloadinfra-25d355fdc48e1630d7847d7238b1dd49f2e618a4.tar.gz
infra-25d355fdc48e1630d7847d7238b1dd49f2e618a4.tar.bz2
infra-25d355fdc48e1630d7847d7238b1dd49f2e618a4.zip
Add role for ilvokhin.com
Diffstat (limited to 'roles/home/tasks')
-rw-r--r--roles/home/tasks/main.yml39
1 files changed, 39 insertions, 0 deletions
diff --git a/roles/home/tasks/main.yml b/roles/home/tasks/main.yml
new file mode 100644
index 0000000..cd6b19c
--- /dev/null
+++ b/roles/home/tasks/main.yml
@@ -0,0 +1,39 @@
+- name: Create /srv/http/ilvokhin.com directory
+ ansible.builtin.file:
+ path: /srv/http/ilvokhin.com
+ state: directory
+ owner: http
+ group: http
+ mode: u+rw,g+rw,o+r
+
+- name: Request SSL certificate for ilvokhin.com
+ ansible.builtin.include_role:
+ name: certificate
+ vars:
+ domains:
+ - ilvokhin.com
+ - www.ilvokhin.com
+
+- ansible.builtin.include_role:
+ name: nginx
+
+- name: Configure nginx for ilvokhin.com
+ ansible.builtin.copy:
+ src: files/ilvokhin.com
+ dest: /etc/nginx/sites-available
+ owner: root
+ group: root
+ mode: u+rw,g+r,o+r
+ notify:
+ - Reload nginx
+
+- name: Enable ilvokhin.com site
+ ansible.builtin.file:
+ src: /etc/nginx/sites-available/ilvokhin.com
+ dest: /etc/nginx/sites-enabled/ilvokhin.com
+ owner: root
+ group: root
+ mode: u+rw,g+r,o+r
+ state: link
+ notify:
+ - Reload nginx