ansible-role-k8s-cert-manager/tasks/csi.yml
Adrien Reslinger 427d3af40f
All checks were successful
continuous-integration/drone/push Build is passing
Reduce maintenance
2021-03-25 00:13:33 +01:00

26 lines
664 B
YAML

---
- name: CSI Cert Manager Setup
block:
- name: Define state to present
set_fact:
certmanager_csi_state: "present"
when:
- certmanager_csi|bool
- name: Define state to absent
set_fact:
certmanager_csi_state: "absent"
when:
- not certmanager_csi|bool
- name: CSI Cert Manager files need to be {{ certmanager_csi_state }}
k8s:
state: "{{ certmanager_csi_state }}"
context: "{{ my_context }}"
apply: true
definition: "{{ item }}"
with_items:
- "{{ lookup('url', certmanager_csi_driver_url, split_lines=False) | from_yaml_all | list }}"
tags:
- cert-manager
- storage