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