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:
@ -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 }}
|
Reference in New Issue
Block a user