k3s unistall script
This commit is contained in:
10
ansible-5/playbooks/kube.uninstall.yaml
Normal file
10
ansible-5/playbooks/kube.uninstall.yaml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
- name: ping
|
||||||
|
hosts: kube
|
||||||
|
gather_facts: true
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
- name: running uninstall script
|
||||||
|
ansible.builtin.command: /usr/local/bin/k3s-uninstall.sh
|
||||||
|
args:
|
||||||
|
removes: /usr/local/bin/k3s-uninstall.sh
|
||||||
0
ansible-5/roles/prod.k3s/tasks/cert_manager.yml
Normal file
0
ansible-5/roles/prod.k3s/tasks/cert_manager.yml
Normal file
@@ -13,52 +13,52 @@
|
|||||||
with_items: "{{fstab.gluster}}"
|
with_items: "{{fstab.gluster}}"
|
||||||
become: true
|
become: true
|
||||||
|
|
||||||
# provision docker image registry
|
# add helm repositories
|
||||||
- include_tasks: add_repos.yml
|
- include_tasks: add_repos.yml
|
||||||
|
|
||||||
# https://artifacthub.io/packages/helm/twuni/docker-registry
|
# https://artifacthub.io/packages/helm/twuni/docker-registry
|
||||||
- name: Deploy latest version of docker-registry in dev-tools namespace
|
#- name: Deploy latest version of docker-registry in dev-tools namespace
|
||||||
local_action:
|
# local_action:
|
||||||
module: kubernetes.core.helm
|
# module: kubernetes.core.helm
|
||||||
name: dkregistry
|
# name: dkregistry
|
||||||
chart_ref: twuni/docker-registry
|
# chart_ref: twuni/docker-registry
|
||||||
release_namespace: dev-tools
|
# release_namespace: dev-tools
|
||||||
create_namespace: True
|
# create_namespace: True
|
||||||
values:
|
# values:
|
||||||
replicaCount: 1
|
# replicaCount: 1
|
||||||
ingress:
|
# ingress:
|
||||||
enabled: true
|
# enabled: true
|
||||||
hosts:
|
# hosts:
|
||||||
- dkregistry.xai-corp.net
|
# - dkregistry.xai-corp.net
|
||||||
className: traefik
|
# className: traefik
|
||||||
secrets.htpassword: me1
|
# secrets.htpassword: me1
|
||||||
extraVolumeMounts:
|
# extraVolumeMounts:
|
||||||
- name: registry-data
|
# - name: registry-data
|
||||||
mountPath: /var/lib/registry-data
|
# mountPath: /var/lib/registry-data
|
||||||
- name: registry-auth
|
# - name: registry-auth
|
||||||
mountPath: /auth
|
# mountPath: /auth
|
||||||
- name: registry-auth
|
# - name: registry-auth
|
||||||
mountPath: /etc/docker/registry/
|
# mountPath: /etc/docker/registry/
|
||||||
- name: letsencrypt-data
|
# - name: letsencrypt-data
|
||||||
mountPath: /certs
|
# mountPath: /certs
|
||||||
- name: letsencrypt-config
|
# - name: letsencrypt-config
|
||||||
mountPath: /etc/letsencrypt
|
# mountPath: /etc/letsencrypt
|
||||||
extraVolumes:
|
# extraVolumes:
|
||||||
- name: registry-data
|
# - name: registry-data
|
||||||
hostPath:
|
# hostPath:
|
||||||
path: /opt/shared/dkregistry/data
|
# path: /opt/shared/dkregistry/data
|
||||||
- name: registry-auth
|
# - name: registry-auth
|
||||||
hostPath:
|
# hostPath:
|
||||||
path: /opt/shared/dkregistry/auth
|
# path: /opt/shared/dkregistry/auth
|
||||||
- name: registry-config
|
# - name: registry-config
|
||||||
hostPath:
|
# hostPath:
|
||||||
path: /opt/shared/dkregistry/config/
|
# path: /opt/shared/dkregistry/config/
|
||||||
- name: letsencrypt-data
|
# - name: letsencrypt-data
|
||||||
hostPath:
|
# hostPath:
|
||||||
path: /opt/shared/letsencrypt-2
|
# path: /opt/shared/letsencrypt-2
|
||||||
- name: letsencrypt-config
|
# - name: letsencrypt-config
|
||||||
hostPath:
|
# hostPath:
|
||||||
path: /opt/shared/letsencrypt-2
|
# path: /opt/shared/letsencrypt-2
|
||||||
# extraEnvVars:
|
# extraEnvVars:
|
||||||
# - name: REGISTRY_HTTP_SECRET
|
# - name: REGISTRY_HTTP_SECRET
|
||||||
# value: aabuioqlwlcpp2
|
# value: aabuioqlwlcpp2
|
||||||
@@ -80,30 +80,30 @@
|
|||||||
# provision argoCD
|
# provision argoCD
|
||||||
|
|
||||||
# provision graphana
|
# provision graphana
|
||||||
- name: Copy manifest for graphana
|
#- name: Copy manifest for graphana
|
||||||
ansible.builtin.copy:
|
# ansible.builtin.copy:
|
||||||
src: manifests/graphana.helm.yaml
|
# src: manifests/graphana.helm.yaml
|
||||||
dest: /var/lib/rancher/k3s/server/manifests/graphana.helm.yaml
|
# dest: /var/lib/rancher/k3s/server/manifests/graphana.helm.yaml
|
||||||
become: true
|
# become: true
|
||||||
|
#
|
||||||
- name: Copy manifest for docker registry
|
#- name: Copy manifest for docker registry
|
||||||
ansible.builtin.copy:
|
# ansible.builtin.copy:
|
||||||
src: manifests/registry.helm.yaml
|
# src: manifests/registry.helm.yaml
|
||||||
dest: /var/lib/rancher/k3s/server/manifests/dkregistry.helm.yaml
|
# dest: /var/lib/rancher/k3s/server/manifests/dkregistry.helm.yaml
|
||||||
become: true
|
# become: true
|
||||||
|
#
|
||||||
- name: Copy manifest for mariadb
|
#- name: Copy manifest for mariadb
|
||||||
ansible.builtin.copy:
|
# ansible.builtin.copy:
|
||||||
src: manifests/mariadb.helm.yaml
|
# src: manifests/mariadb.helm.yaml
|
||||||
dest: /var/lib/rancher/k3s/server/manifests/mariadb.helm.yaml
|
# dest: /var/lib/rancher/k3s/server/manifests/mariadb.helm.yaml
|
||||||
become: true
|
# become: true
|
||||||
|
#
|
||||||
- name: remove manifests
|
#- name: remove manifests
|
||||||
ansible.builtin.file:
|
# ansible.builtin.file:
|
||||||
state: absent
|
# state: absent
|
||||||
path: "{{ item }}"
|
# path: "{{ item }}"
|
||||||
loop:
|
# loop:
|
||||||
- /var/lib/rancher/k3s/server/manifests/graphana.helm.yaml
|
# - /var/lib/rancher/k3s/server/manifests/graphana.helm.yaml
|
||||||
- /var/lib/rancher/k3s/server/manifests/dkregistry.helm.yaml
|
# - /var/lib/rancher/k3s/server/manifests/dkregistry.helm.yaml
|
||||||
- /var/lib/rancher/k3s/server/manifests/mariadb.helm.yaml
|
# - /var/lib/rancher/k3s/server/manifests/mariadb.helm.yaml
|
||||||
become: true
|
# become: true
|
||||||
|
|||||||
Reference in New Issue
Block a user