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