ansible-role-k8s-cert-manager/tasks/csi.yml
2020-03-26 14:30:36 +01:00

22 lines
667 B
YAML

---
- set_fact:
certmanager_csi_state: "present"
when:
- certmanager_csi
- set_fact:
certmanager_csi_state: "absent"
when:
- not certmanager_csi
- name: Cert Manager files version {{ certmanager_version }} need to be {{ certmanager_csi_state }}
k8s:
state: "{{ certmanager_csi_state }}"
context: "{{ my_context }}"
resource_definition: "{{ lookup('files', item) | from_yaml }}"
with_items:
- "csi/csi.cert-manager.io-CSIDriver.yaml"
- "csi/cert-manager-csi-ServiceAccount.yaml"
- "csi/cert-manager-csi-ClusterRole.yaml"
- "csi/cert-manager-csi-ClusterRoleBinding.yaml"
- "csi/cert-manager-csi-DaemonSet.yaml"