Add conditional;Inject manifests
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-07-15 12:14:12 +02:00
parent 2f976898eb
commit 54caff8fb6
4 changed files with 38 additions and 2 deletions

View File

@ -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:

View File

@ -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:

View File

@ -0,0 +1,7 @@
apiVersion: traefik.containo.us/v1alpha1
kind: IngressRouteTCP
metadata:
name: {{ item.name }}
namespace: {{ item.namespace }}
spec:
{{ item.config }}