summaryrefslogtreecommitdiffstats
path: root/roles/ands_kaas/tasks/file.yml
diff options
context:
space:
mode:
Diffstat (limited to 'roles/ands_kaas/tasks/file.yml')
-rw-r--r--roles/ands_kaas/tasks/file.yml9
1 files changed, 9 insertions, 0 deletions
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"