From c5c5707f679a010bf15ad99bfc73d1888e447df6 Mon Sep 17 00:00:00 2001 From: Timo Makinen Date: Wed, 9 Sep 2020 20:23:07 +0000 Subject: [PATCH] Configure user and role dirs for static hosts --- playbooks/static.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/playbooks/static.yml b/playbooks/static.yml index be524e8..2215dea 100644 --- a/playbooks/static.yml +++ b/playbooks/static.yml @@ -19,3 +19,27 @@ - ldap/nss - autofs - apache + + tasks: + - name: share role and home directories to apache + copy: + dest: /etc/httpd/conf.local.d/public_html.conf + content: | + UserDir enabled + UserDir public_html + + Options SymLinksIfOwnerMatch IncludesNoExec Indexes MultiViews + AllowOverride AuthConfig FileInfo Indexes Limit + Require all granted + + + AliasMatch ^/roles/([a-z]*)/(.*) /roles/$1/public/public_html/$2 + + Options FollowSymLinks IncludesNoExec Indexes MultiViews + AllowOverride AuthConfig FileInfo Indexes Limit + Require all granted + + mode: 0644 + owner: root + group: "{{ ansible_wheel }}" + notify: restart apache