1
0
IaC/ansible/roles/k8s_cert_manager/tasks/main.yaml

38 lines
1.5 KiB
YAML
Raw Permalink Normal View History

2022-12-08 08:40:44 -05:00
---
2022-12-09 03:26:01 -05:00
# - name: download the cert manager manifest
# ansible.builtin.uri:
# url: https://github.com/cert-manager/cert-manager/releases/download/{{ cert_manager_version }}/cert-manager.yaml
# dest: "{{ ansible_search_path[0] }}/files/cert_manager_{{ cert_manager_version }}.yaml"
# creates: "{{ ansible_search_path[0] }}/files/cert_manager_{{ cert_manager_version }}.yaml"
# mode: 0664
# - name: install cert manager manifest to cluster
# kubernetes.core.k8s:
# state: present
# src: "{{ ansible_search_path[0] }}/files/cert_manager_{{ cert_manager_version }}.yaml"
- name: template out the cert manager secrets definition file
ansible.builtin.template:
src: cert-manager-secrets.yaml.j2
dest: "{{ ansible_search_path[0] }}/files/cert-manager-secrets.yaml"
- name: apply cert manager secrets definition
kubernetes.core.k8s:
state: present
src: "{{ ansible_search_path[0] }}/files/cert-manager-secrets.yaml"
- name: template out the cert manager issuer definition files
ansible.builtin.template:
src: cert-manager-issuer-acme.yaml.j2
dest: "{{ ansible_search_path[0] }}/files/cert-manager-issuer-acme-{{ item.provider }}-{{ item.environment }}.yaml"
with_items:
"{{ cert_manager_acme_providers }}"
- name: apply cert manager issuer definition files
2022-12-08 08:40:44 -05:00
kubernetes.core.k8s:
state: present
2022-12-09 03:26:01 -05:00
src: "{{ ansible_search_path[0] }}/files/cert-manager-issuer-acme-{{ item.provider }}-{{ item.environment }}.yaml"
with_items:
2023-01-05 02:46:06 -05:00
"{{ cert_manager_acme_providers }}"
2022-12-09 03:26:01 -05:00