From 6449e467ea5bce7b8639256d05b22a6a2e0a2c83 Mon Sep 17 00:00:00 2001 From: binary Date: Sat, 23 Jan 2021 12:30:40 +0100 Subject: Basic http-only website configuration --- roles/website/tasks/main.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 roles/website/tasks/main.yml (limited to 'roles/website/tasks/main.yml') 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 -- cgit v1.2.3