diff --git a/roles/people/tasks/main.yml b/roles/people/tasks/main.yml index 89d8de2115..bbc72cab29 100644 --- a/roles/people/tasks/main.yml +++ b/roles/people/tasks/main.yml @@ -96,6 +96,21 @@ - config - selinux +- name: check the selinux context of the web dir + command: matchpathcon "/srv/web(/.*)?" + register: gitcontext + always_run: yes + changed_when: false + tags: + - config + - selinux + +- name: set the SELinux policy for the web dir + command: semanage fcontext -a -t httpd_sys_content_t "/srv/web(/.*)?" + when: gitcontext.stdout.find('httpd_sys_content_t') == -1 + tags: + - config + - selinux # # This sets the default, it's safe to always run. # Default quota for users is 2gb