29 lines
714 B
YAML
29 lines
714 B
YAML
---
|
|
- name: CSI Cert Manager Setup
|
|
block:
|
|
- name: Include vars for CSI
|
|
include_vars: "files_list_csi.yml"
|
|
|
|
- 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 }}"
|
|
merge_type: merge
|
|
resource_definition: "{{ lookup('file', item) | from_yaml }}"
|
|
with_items:
|
|
- '{{ certmanager_csi_list }}'
|
|
tags:
|
|
- certmanager
|
|
- storage
|