From 47f350bc3aa85a8bd406d95faf084df2abf74ae9 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Sun, 18 Mar 2018 22:59:31 +0100 Subject: Second revision: includes hostpath mounts, gluster block storage, kaas apps, etc. --- roles/ands_kaas/tasks/file.yml | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'roles/ands_kaas/tasks/file.yml') diff --git a/roles/ands_kaas/tasks/file.yml b/roles/ands_kaas/tasks/file.yml index 488823b..393fe08 100644 --- a/roles/ands_kaas/tasks/file.yml +++ b/roles/ands_kaas/tasks/file.yml @@ -21,3 +21,12 @@ owner: "{{ owner }}" group: "{{ group }}" state: "{{ file.state | default('directory') }}" + + +- name: "Setting selinux context in {{ path }}" + sefcontext: target="{{ hostpath }}" setype="svirt_sandbox_file_t" state="present" reload="yes" + when: voltype[0] == "host" + +- name: "Apply selinux context in {{ path }}" + shell: restorecon "{{ hostpath }}" + when: voltype[0] == "host" -- cgit v1.2.3