Add conditional;Inject manifests
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
2f976898eb
commit
54caff8fb6
@ -215,7 +215,7 @@
|
||||
loop_control:
|
||||
label: "{{ item.organization + '/' + item.body.name }}"
|
||||
|
||||
# when: gitea_existing_config.json.data is undefined
|
||||
when: (gitea_existing_config.json is undefined) or (gitea_existing_config.json.data | length == 0)
|
||||
|
||||
module_defaults:
|
||||
ansible.builtin.uri:
|
||||
|
@ -53,7 +53,19 @@
|
||||
docker://{{ item }} \
|
||||
docker-archive:./{{ ( item | regex_findall('[^/:]+'))[-2] }}.tar:{{ item }}
|
||||
chdir: /opt/metacluster/container-images
|
||||
loop: "{{ containerimages.results | map(attribute='stdout_lines') | flatten + dependencies.container_images }}"
|
||||
loop: "{{ (containerimages.results | map(attribute='stdout_lines') | flatten) + dependencies.container_images }}"
|
||||
|
||||
- name: Inject manifests
|
||||
ansible.builtin.template:
|
||||
src: "{{ item.type }}.j2"
|
||||
dest: /var/lib/rancher/k3s/server/manifests/{{ item.name }}-manifest.yaml
|
||||
owner: root
|
||||
group: root
|
||||
mode: 0600
|
||||
when: item is defined
|
||||
loop: "{{ lookup('ansible.builtin.dict', components) | map(attribute='value.manifests') | list }}"
|
||||
loop_control:
|
||||
label: "{{ item.key }}"
|
||||
|
||||
- name: Compress tarballs
|
||||
community.general.archive:
|
||||
|
7
ansible/roles/metacluster/templates/ingressroutetcp.j2
Normal file
7
ansible/roles/metacluster/templates/ingressroutetcp.j2
Normal file
@ -0,0 +1,7 @@
|
||||
apiVersion: traefik.containo.us/v1alpha1
|
||||
kind: IngressRouteTCP
|
||||
metadata:
|
||||
name: {{ item.name }}
|
||||
namespace: {{ item.namespace }}
|
||||
spec:
|
||||
{{ item.config }}
|
@ -7,6 +7,9 @@ platform:
|
||||
- name: traefik
|
||||
namespace: kube-system
|
||||
config: |2
|
||||
# ingressRoute:
|
||||
# dashboard:
|
||||
# enabled: true
|
||||
ports:
|
||||
ssh:
|
||||
port: 8022
|
||||
@ -23,6 +26,8 @@ platform:
|
||||
url: https://dl.gitea.io/charts/
|
||||
- name: argo
|
||||
url: https://argoproj.github.io/argo-helm
|
||||
- name: sealed-secrets
|
||||
url: https://bitnami-labs.github.io/sealed-secrets
|
||||
|
||||
components:
|
||||
|
||||
@ -78,6 +83,18 @@ components:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
manifests:
|
||||
- type: ingressroutetcp
|
||||
name: gitea-ssh
|
||||
namespace: gitea
|
||||
config: |2
|
||||
entryPoints:
|
||||
- ssh
|
||||
routes:
|
||||
- match: HostSNI(`*`)
|
||||
services:
|
||||
- name: gitea-ssh
|
||||
port: 22
|
||||
|
||||
argo-cd:
|
||||
helm:
|
||||
|
Loading…
Reference in New Issue
Block a user