Make selinux aware that /home == /srv/home

Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
Patrick Uiterwijk 2016-02-11 20:02:54 +00:00
parent 2f1b31f4db
commit 4702bb99cb

View file

@ -129,6 +129,24 @@
- config
- selinux
# This is a file context alias, to let ansible know that /home and /srv/home
# are equal as far as contexts are concerned.
- name: check the selinux context alias of the home dir
command: matchpathcon "/srv/home"
register: gitcontext
always_run: yes
changed_when: false
tags:
- config
- selinux
- name: set the SELinux policy alias for the home dir
command: semanage fcontext -a -e /home /srv/home
when: gitcontext.stdout.find('home_root_t') == -1
tags:
- config
- selinux
#
# This sets the default, it's safe to always run.
# Default quota for users is 2gb