summaryrefslogtreecommitdiffstats
path: root/ansible/roles/k8s-persistent-volume/tasks/main.yml
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/roles/k8s-persistent-volume/tasks/main.yml')
-rw-r--r--ansible/roles/k8s-persistent-volume/tasks/main.yml8
1 files changed, 8 insertions, 0 deletions
diff --git a/ansible/roles/k8s-persistent-volume/tasks/main.yml b/ansible/roles/k8s-persistent-volume/tasks/main.yml
index 94f4e0b3..8428857f 100644
--- a/ansible/roles/k8s-persistent-volume/tasks/main.yml
+++ b/ansible/roles/k8s-persistent-volume/tasks/main.yml
@@ -9,3 +9,11 @@
wait: True
template: pv.yaml.j2
loop: "{{ k8s_volumes }}"
+
+- name: Create host paths for PVs and set their permissions
+ file:
+ path: "{{ item.path_prefix }}/{{ item.name }}"
+ state: directory
+ owner: "{{ item.owner | default(0) }}"
+ group: "{{ item.group | default(0) }}"
+ loop: "{{ k8s_volumes }}"