k8s let's encrypt issuer and cert creation
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
---
|
||||
# https://cert-manager.io/docs/installation/helm/#installing-with-helm
|
||||
- name: install cert-manager
|
||||
kubernetes.core.helm:
|
||||
kubeconfig_path: "/etc/rancher/k3s/k3s.yaml"
|
||||
atomic: true
|
||||
name: cert-manager
|
||||
chart_ref: jetstack/cert-manager
|
||||
release_namespace: cert-manager
|
||||
create_namespace: true
|
||||
release_values:
|
||||
installCRDs: true
|
||||
become: true
|
||||
|
||||
# create issuer
|
||||
- name: create let's encrypt issuers
|
||||
kubernetes.core.k8s:
|
||||
kubeconfig: "/etc/rancher/k3s/k3s.yaml"
|
||||
state: present
|
||||
definition: "{{ lookup('file', item) | from_yaml }}"
|
||||
become: true
|
||||
loop:
|
||||
- 'cert-manager/acme.issuer.stg.yaml'
|
||||
- 'cert-manager/acme.issuer.prod.yaml'
|
||||
|
||||
- name: create let's encrypt certificates
|
||||
kubernetes.core.k8s:
|
||||
kubeconfig: "/etc/rancher/k3s/k3s.yaml"
|
||||
state: present
|
||||
definition: "{{ lookup('file', item) | from_yaml }}"
|
||||
become: true
|
||||
loop:
|
||||
- 'cert-manager/certificate.xai-corp.stg.yaml'
|
||||
- 'cert-manager/certificate.xai-corp.prod.yaml'
|
||||
|
||||
12
ansible-5/roles/prod.k3s/tasks/gluster.fstab.yml
Normal file
12
ansible-5/roles/prod.k3s/tasks/gluster.fstab.yml
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
|
||||
- name: Create glusterfs fstab entries
|
||||
ansible.posix.mount:
|
||||
path: "{{item.path}}"
|
||||
src: "gluster:/{{item.name}}"
|
||||
fstype: "glusterfs"
|
||||
boot: false
|
||||
opts: "direct-io-mode=disable,_netdev,x-systemd.automount 0 0"
|
||||
state: "{{item.state}}"
|
||||
with_items: "{{fstab.gluster}}"
|
||||
become: true
|
||||
@@ -2,19 +2,13 @@
|
||||
# provisioning services in k3s cluster
|
||||
|
||||
# mount gluster
|
||||
- name: Create glusterfs fstab entries
|
||||
ansible.posix.mount:
|
||||
path: "{{item.path}}"
|
||||
src: "gluster:/{{item.name}}"
|
||||
fstype: "glusterfs"
|
||||
boot: false
|
||||
opts: "direct-io-mode=disable,_netdev,x-systemd.automount 0 0"
|
||||
state: "{{item.state}}"
|
||||
with_items: "{{fstab.gluster}}"
|
||||
become: true
|
||||
#- include_tasks: gluster.fstab.yml
|
||||
|
||||
# add helm repositories
|
||||
- include_tasks: add_repos.yml
|
||||
#- include_tasks: add_repos.yml
|
||||
|
||||
|
||||
- include_tasks: cert_manager.yml
|
||||
|
||||
# https://artifacthub.io/packages/helm/twuni/docker-registry
|
||||
#- name: Deploy latest version of docker-registry in dev-tools namespace
|
||||
|
||||
Reference in New Issue
Block a user