Compare commits
2 commits
22060ce241
...
acbd41024a
| Author | SHA1 | Date | |
|---|---|---|---|
| acbd41024a | |||
| c20b1ce29a |
7 changed files with 39 additions and 36 deletions
|
|
@ -1,23 +1,28 @@
|
|||
---
|
||||
- set_fact:
|
||||
certmanager_csi_state: "present"
|
||||
when:
|
||||
- certmanager_csi|bool
|
||||
- name: CSI Cert Manager Setup
|
||||
block:
|
||||
- set_fact:
|
||||
certmanager_csi_state: "present"
|
||||
when:
|
||||
- certmanager_csi|bool
|
||||
|
||||
- set_fact:
|
||||
certmanager_csi_state: "absent"
|
||||
when:
|
||||
- not certmanager_csi|bool
|
||||
- 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('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"
|
||||
- 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:
|
||||
- "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"
|
||||
tags:
|
||||
- certmanager
|
||||
- storage
|
||||
|
|
|
|||
|
|
@ -1,8 +1,3 @@
|
|||
- name: Print the kubectl context
|
||||
debug:
|
||||
var: my_context
|
||||
tags: certmanager
|
||||
|
||||
- name: Cert Manager setup
|
||||
block:
|
||||
- name: namespace
|
||||
|
|
@ -12,7 +7,6 @@
|
|||
name: cert-manager
|
||||
api_version: v1
|
||||
kind: Namespace
|
||||
tags: certmanager
|
||||
|
||||
- name: Get Deployment information object
|
||||
k8s_info:
|
||||
|
|
@ -33,36 +27,35 @@
|
|||
include_tasks: "version_0.11.0.yml"
|
||||
when:
|
||||
- certmanager_version | regex_search('(0.11)') or certmanager_actual_version.stdout | regex_search('(0.11)')
|
||||
tags: certmanager
|
||||
|
||||
- name: install / uninstall version 0.12
|
||||
include_tasks: "version_0.12.yml"
|
||||
when:
|
||||
- certmanager_version | regex_search('(0.12)') or certmanager_actual_version.stdout | regex_search('(0.12)')
|
||||
tags: certmanager
|
||||
|
||||
- name: install / uninstall version 0.13
|
||||
include_tasks: "version_0.13.yml"
|
||||
when:
|
||||
- certmanager_version | regex_search('(0.13)') or certmanager_actual_version.stdout | regex_search('(0.13)')
|
||||
tags: certmanager
|
||||
|
||||
- name: install / uninstall version 0.14
|
||||
include_tasks: "version_0.14.yml"
|
||||
when:
|
||||
- certmanager_version | regex_search('(0.14)') or certmanager_actual_version.stdout | regex_search('(0.14)')
|
||||
tags: certmanager
|
||||
|
||||
- name: install / uninstall version 0.15
|
||||
include_tasks: "version_0.15.yml"
|
||||
when:
|
||||
- certmanager_version | regex_search('(0.15)') or certmanager_actual_version.stdout | regex_search('(0.15)')
|
||||
tags: certmanager
|
||||
|
||||
tags: certmanager
|
||||
|
||||
|
||||
|
||||
- name: install / uninstall Cert-Manager CSI Kubernetes drivers
|
||||
include_tasks: "csi.yml"
|
||||
when:
|
||||
- certmanager_csi
|
||||
tags: certmanager|bool
|
||||
- name: install / uninstall Cert-Manager CSI Kubernetes drivers
|
||||
include_tasks: "csi.yml"
|
||||
when:
|
||||
- certmanager_csi|bool
|
||||
tags:
|
||||
- certmanager
|
||||
- storage
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
k8s:
|
||||
state: "{{ certmanager_0_11_0_state }}"
|
||||
context: "{{ my_context }}"
|
||||
merge_type: merge
|
||||
resource_definition: "{{ lookup('template', item) | from_yaml }}"
|
||||
with_items:
|
||||
- "0.11.0/challenges.acme.cert-manager.io-CustomResourceDefinition.yaml"
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
k8s:
|
||||
state: "{{ certmanager_0_12_state }}"
|
||||
context: "{{ my_context }}"
|
||||
merge_type: merge
|
||||
resource_definition: "{{ lookup('template', item) | from_yaml }}"
|
||||
with_items:
|
||||
- "0.12/certificaterequests.cert-manager.io-CustomResourceDefinition.yaml"
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
k8s:
|
||||
state: "{{ certmanager_0_13_state }}"
|
||||
context: "{{ my_context }}"
|
||||
merge_type: merge
|
||||
resource_definition: "{{ lookup('template', item) | from_yaml }}"
|
||||
with_items:
|
||||
- "0.13/certificaterequests.cert-manager.io-CustomResourceDefinition.yaml"
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
k8s:
|
||||
state: "{{ certmanager_0_14_state }}"
|
||||
context: "{{ my_context }}"
|
||||
merge_type: merge
|
||||
resource_definition: "{{ lookup('template', item) | from_yaml }}"
|
||||
with_items:
|
||||
- "0.14/certificaterequests.cert-manager.io-CustomResourceDefinition.yaml"
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
k8s:
|
||||
state: "{{ certmanager_0_15_state }}"
|
||||
context: "{{ my_context }}"
|
||||
merge_type: merge
|
||||
resource_definition: "{{ lookup('template', item) | from_yaml }}"
|
||||
with_items:
|
||||
- "0.15/issuers.cert-manager.io-CustomResourceDefinition.yaml"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue