Configure user and role dirs for static hosts

This commit is contained in:
Timo Makinen 2020-09-09 20:23:07 +00:00
parent 0aa882f07a
commit c5c5707f67

View file

@ -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
<Directory "/home/*/public_html">
Options SymLinksIfOwnerMatch IncludesNoExec Indexes MultiViews
AllowOverride AuthConfig FileInfo Indexes Limit
Require all granted
</Directory>
AliasMatch ^/roles/([a-z]*)/(.*) /roles/$1/public/public_html/$2
<Directory "/roles/*/public/public_html">
Options FollowSymLinks IncludesNoExec Indexes MultiViews
AllowOverride AuthConfig FileInfo Indexes Limit
Require all granted
</Directory>
mode: 0644
owner: root
group: "{{ ansible_wheel }}"
notify: restart apache