summaryrefslogtreecommitdiffstats
path: root/roles/ands_kaas/tasks/volume.yml
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2018-03-18 22:59:31 +0100
committerSuren A. Chilingaryan <csa@suren.me>2018-03-18 22:59:31 +0100
commit47f350bc3aa85a8bd406d95faf084df2abf74ae9 (patch)
tree72ad1e91bac46d3457f89781dc90f0d6c1c074d5 /roles/ands_kaas/tasks/volume.yml
parent006f333828db373435daa15483d2ab753048f62a (diff)
downloadands-47f350bc3aa85a8bd406d95faf084df2abf74ae9.tar.gz
ands-47f350bc3aa85a8bd406d95faf084df2abf74ae9.tar.bz2
ands-47f350bc3aa85a8bd406d95faf084df2abf74ae9.tar.xz
ands-47f350bc3aa85a8bd406d95faf084df2abf74ae9.zip
Second revision: includes hostpath mounts, gluster block storage, kaas apps, etc.
Diffstat (limited to 'roles/ands_kaas/tasks/volume.yml')
-rw-r--r--roles/ands_kaas/tasks/volume.yml16
1 files changed, 15 insertions, 1 deletions
diff --git a/roles/ands_kaas/tasks/volume.yml b/roles/ands_kaas/tasks/volume.yml
index 783654a..2c695f2 100644
--- a/roles/ands_kaas/tasks/volume.yml
+++ b/roles/ands_kaas/tasks/volume.yml
@@ -2,6 +2,9 @@
- name: "Configure {{ name }} fact"
set_fact: "kaas_{{ name }}_path={{ path }}"
+- name: "Configure {{ name }} fact"
+ set_fact: "kaas_{{ name }}_hostpath={{ hostpath }}"
+
- name: "Ensure {{ path }} exists"
file:
path: "{{ path }}"
@@ -41,5 +44,16 @@
- mkdir | changed
- chmod | skipped
+- name: "Setting SELinux context for non standard locations"
+ sefcontext: target="{{ hostpath }}" setype="svirt_sandbox_file_t" state="present" reload="yes"
+ when:
+ - mkdir | changed
+ - chmod | skipped
+ - voltype[0] == "host"
-
+- name: "Apply SELinux context for non standard locations"
+ shell: restorecon "{{ hostpath }}"
+ when:
+ - mkdir | changed
+ - chmod | skipped
+ - voltype[0] == "host"