Make selinux aware that /home == /srv/home
Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
parent
2f1b31f4db
commit
4702bb99cb
1 changed files with 18 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue