aboutsummaryrefslogtreecommitdiffstats
path: root/roles/obsd_www/tasks
diff options
context:
space:
mode:
authorEugene Triguba <hello@eugenetriguba.com>2026-10-19 22:32:54 -0700
committerEugene Triguba <hello@eugenetriguba.com>2026-10-19 22:32:54 -0700
commit6cf0129d002d0bbc88756f4d662e0f5af043dc52 (patch)
tree45c56805d7f49e5f1977050f7fa6da81b8ec9138 /roles/obsd_www/tasks
parentRename cgit to git and acme to ssl for httpd (diff)
downloadsite-configs-6cf0129d002d0bbc88756f4d662e0f5af043dc52.zip
Add static site hosting for eugenetriguba.com
Diffstat (limited to 'roles/obsd_www/tasks')
-rw-r--r--roles/obsd_www/tasks/main.yml25
1 files changed, 25 insertions, 0 deletions
diff --git a/roles/obsd_www/tasks/main.yml b/roles/obsd_www/tasks/main.yml
new file mode 100644
index 0000000..91aefd1
--- /dev/null
+++ b/roles/obsd_www/tasks/main.yml
@@ -0,0 +1,25 @@
+- name: Create www htdocs dir
+ ansible.builtin.file:
+ path: "{{ obsd_www_chroot }}{{ obsd_www_htdocs_dir }}"
+ state: directory
+ owner: www
+ group: www
+ mode: "0775"
+
+- name: Add initial dummy index.html file (if one does not exist)
+ ansible.builtin.copy:
+ src: index.html
+ dest: "{{ obsd_www_chroot }}{{ obsd_www_htdocs_dir }}/index.html"
+ force: false
+ owner: root
+ group: wheel
+ mode: "0664"
+
+- name: Deploy www vhost fragment
+ ansible.builtin.template:
+ src: httpd.d/www.conf.j2
+ dest: "{{ obsd_httpd_conf_d }}/www.conf"
+ owner: root
+ group: wheel
+ mode: "0644"
+ notify: Reload httpd