2019-11-01 15:59:24 +08:00
|
|
|
---
|
|
|
|
- name: Kubernetes Persistent Volumes | Copy Cinder CSI Storage Class template
|
|
|
|
template:
|
|
|
|
src: "cinder-csi-storage-class.yml.j2"
|
|
|
|
dest: "{{ kube_config_dir }}/cinder-csi-storage-class.yml"
|
2024-07-26 09:42:20 +08:00
|
|
|
mode: "0644"
|
2019-11-01 15:59:24 +08:00
|
|
|
register: manifests
|
|
|
|
when:
|
2021-03-24 08:26:05 +08:00
|
|
|
- inventory_hostname == groups['kube_control_plane'][0]
|
2019-11-01 15:59:24 +08:00
|
|
|
|
|
|
|
- name: Kubernetes Persistent Volumes | Add Cinder CSI Storage Class
|
|
|
|
kube:
|
|
|
|
name: cinder-csi
|
|
|
|
kubectl: "{{ bin_dir }}/kubectl"
|
|
|
|
resource: StorageClass
|
|
|
|
filename: "{{ kube_config_dir }}/cinder-csi-storage-class.yml"
|
|
|
|
state: "latest"
|
|
|
|
when:
|
2021-03-24 08:26:05 +08:00
|
|
|
- inventory_hostname == groups['kube_control_plane'][0]
|
2019-11-01 15:59:24 +08:00
|
|
|
- manifests.changed
|