aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/adapters/ansible
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/adapters/ansible')
-rwxr-xr-xdeploy/adapters/ansible/kubernetes/ansible-kubernetes.yml3
-rw-r--r--deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml18
2 files changed, 20 insertions, 1 deletions
diff --git a/deploy/adapters/ansible/kubernetes/ansible-kubernetes.yml b/deploy/adapters/ansible/kubernetes/ansible-kubernetes.yml
index 1eae8a97..68dec5c2 100755
--- a/deploy/adapters/ansible/kubernetes/ansible-kubernetes.yml
+++ b/deploy/adapters/ansible/kubernetes/ansible-kubernetes.yml
@@ -47,7 +47,8 @@
remote_user: root
max_fail_percentage: 0
roles:
- - storage
+ - role: storage
+ when: stor4nfv is defined and stor4nfv == "Enable"
- hosts: storage_master
remote_user: root
diff --git a/deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml b/deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml
index 187e2a52..6d947623 100644
--- a/deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml
+++ b/deploy/adapters/ansible/kubernetes/roles/kargo/tasks/main.yml
@@ -199,6 +199,24 @@
regexp: '"calico", "weave", "canal", "flannel"',
replace: '"calico", "weave", "canal", "flannel", "2flannel"'}
+# yamllint disable rule:line-length
+- name: enable CSI plugin feature
+ lineinfile:
+ dest: "/opt/kargo_k8s/roles/kubespray-defaults/defaults/main.yaml"
+ regexp: "^kube_feature_gates:"
+ line: "{% raw %}kube_feature_gates: ['Initializers={{ istio_enabled|string }}', 'PersistentLocalVolumes={{ local_volumes_enabled|string }}', 'CSIPersistentVolume=True', 'MountPropagation=True']{% endraw %}"
+ when:
+ - stor4nfv is defined and stor4nfv == "Enable"
+# yamllint enable rule:line-length
+
+- name: enable CSI plugin runtime_config
+ lineinfile:
+ dest: /opt/kargo_k8s/roles/kubernetes/master/defaults/main.yml
+ insertafter: '^ - admissionregistration.k8s.io/v1alpha1'
+ line: ' - storage.k8s.io/v1alpha1'
+ when:
+ - stor4nfv is defined and stor4nfv == "Enable"
+
- name: run kargo playbook
shell: |
cd /opt/kargo_k8s