@ -1,5 +1,23 @@
---
- name : Cert Manager | Remove legacy addon dir and manifests
file:
path : "{{ kube_config_dir }}/addons/cert_manager"
state : absent
when:
- inventory_hostname == groups['kube-master'][0]
tags:
- upgrade
- name : Cert Manager | Remove legacy namespace
shell : |
{{ bin_dir }}/kubectl delete namespace {{ cert_manager_namespace }}
ignore_errors : yes
when:
- inventory_hostname == groups['kube-master'][0]
tags:
- upgrade
- name : Cert Manager | Create addon dir
file:
path : "{{ kube_config_dir }}/addons/cert_manager"
@ -7,20 +25,22 @@
owner : root
group : root
mode : 0755
when:
- inventory_hostname == groups['kube-master'][0]
- name : Cert Manager | Create manifests
template:
src : "{{ item.file }}.j2"
dest : "{{ kube_config_dir }}/addons/cert_manager/{{ item.file }}"
with_items:
- { name: cert-manager-ns, file: cert-manager-ns .yml, type : ns }
- { name: cert-manager-sa , file: cert-manager-sa .yml, type : sa }
- { name: cert-manager-clusterrole, file: cert-manager-clusterrole.yml, type : clusterrole }
- { name: cert-manager-clusterrolebinding, file: cert-manager-clusterrolebinding .yml, type : cluste rrolebin ding }
- { name: cert-manager-issuer-crd, file: cert-manager-issuer-crd .yml, type : crd }
- { name: cert-manager-clusterissuer-crd, file: cert-manager-clusterissuer-crd.yml, type : crd }
- { name: cert-manager-certificate-crd, file: cert-manager-certificate-crd .yml, type : crd }
- { name: cert-manager-deploy , file: cert-manager-deploy .yml, type : deploy }
- { name: 00-namespace, file: 00-namespace .yml, type : ns }
- { name: sa- cert-manager, file: sa- cert-manager.yml, type : sa }
- { name: crd-certificate, file: crd-certificate.yml, type : crd }
- { name: crd-clusterissuer, file: crd-clusterissuer .yml, type : crd }
- { name: crd-issuer, file: crd-issuer .yml, type : crd }
- { name: clusterrole-cert-manager, file: clusterrole-cert-manager.yml, type : clusterrole }
- { name: clusterrolebinding-cert-manager, file: clusterrolebinding-cert-manager .yml, type : cluste rrolebin ding }
- { name: deploy- cert-manager, file: deploy- cert-manager.yml, type : deploy }
register : cert_manager_manifests
when:
- inventory_hostname == groups['kube-master'][0]