From 9b52b0e1b028850fec2bde9514ed741875c0f086 Mon Sep 17 00:00:00 2001 From: Stephen Smoogen Date: Thu, 11 Feb 2016 18:32:48 +0000 Subject: [PATCH] someone must have put this context in by hand last time.. bad someone bad.. no cookie --- roles/people/tasks/main.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/roles/people/tasks/main.yml b/roles/people/tasks/main.yml index b02295c880..9b13039c2d 100644 --- a/roles/people/tasks/main.yml +++ b/roles/people/tasks/main.yml @@ -96,6 +96,23 @@ tags: - config - selinux + +- name: check the selinux context of the people dir + command: matchpathcon "/srv/people(/.*)?" + 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/people(/.*)?" + 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