aboutsummaryrefslogtreecommitdiffstats
path: root/roles/website/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/website/tasks/main.yml')
-rw-r--r--roles/website/tasks/main.yml24
1 files changed, 24 insertions, 0 deletions
diff --git a/roles/website/tasks/main.yml b/roles/website/tasks/main.yml
new file mode 100644
index 0000000..7ac5d65
--- /dev/null
+++ b/roles/website/tasks/main.yml
@@ -0,0 +1,24 @@
+
+# website ~~ roles/website/tasks/main.yml
+# website setup
+
+---
+
+- name: ensure website dir exists
+ file:
+ path: "/var/www/htdocs/{{ global.domain_name }}"
+ owner: www
+ group: www
+ mode: 0550
+ state: directory
+
+- name: generate website configuration
+ template:
+ src: httpd.conf.j2
+ dest: "/etc/httpd.d/{{ global.domain_name }}.conf"
+ owner: "{{ user_root }}"
+ group: "{{ group_root }}"
+ mode: 0644
+
+- name: ensure httpd is restarted
+ service: name=httpd state=restarted enabled=true
remember that computers suck.