diff options
author | binary <me@rgoncalves.se> | 2021-01-23 12:30:40 +0100 |
---|---|---|
committer | binary <me@rgoncalves.se> | 2021-01-23 12:30:40 +0100 |
commit | 6449e467ea5bce7b8639256d05b22a6a2e0a2c83 (patch) | |
tree | 41f59a47b20f2f1bc97f1d8ce41c03a68a24e9ac /roles/website/tasks | |
parent | aa2710ec320b5744405c26d216db039a57dc4c0e (diff) | |
download | infrastructure-6449e467ea5bce7b8639256d05b22a6a2e0a2c83.tar.gz |
Basic http-only website configuration
Diffstat (limited to 'roles/website/tasks')
-rw-r--r-- | roles/website/tasks/main.yml | 24 |
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 |