Force apply manifests w/ handler;Add dependency
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Danny Bessems 2022-08-16 15:16:20 +02:00
parent d652cf0346
commit c57291af6d
5 changed files with 37 additions and 1 deletions

View File

@ -14,3 +14,9 @@
- workloadcluster - workloadcluster
- tty - tty
- cleanup - cleanup
handlers:
- name: Apply manifests
kubernetes.core.k8s:
src: "{{ item }}"
state: present
with_fileglob: /var/lib/rancher/k3s/server/manifests/*.yaml

View File

@ -34,6 +34,11 @@
services: services:
- kind: TraefikService - kind: TraefikService
name: api@internal name: api@internal
notify:
- Apply manifests
- name: Trigger handlers
ansible.builtin.meta: flush_handlers
- name: Ensure API availability - name: Ensure API availability
ansible.utils.cli_parse: ansible.utils.cli_parse:
@ -137,6 +142,11 @@
ansible.builtin.template: ansible.builtin.template:
dest: /etc/rancher/k3s/registries.yaml dest: /etc/rancher/k3s/registries.yaml
src: registries.j2 src: registries.j2
notify:
- Apply manifests
- name: Trigger handlers
ansible.builtin.meta: flush_handlers
- block: - block:
@ -169,6 +179,11 @@
services: services:
- name: gitea-ssh - name: gitea-ssh
port: 22 port: 22
notify:
- Apply manifests
- name: Trigger handlers
ansible.builtin.meta: flush_handlers
- name: Ensure gitea API availability - name: Ensure gitea API availability
ansible.utils.cli_parse: ansible.utils.cli_parse:
@ -338,6 +353,11 @@
namespace: argo-cd namespace: argo-cd
uid: "{{ lookup('ansible.builtin.password', '/dev/null length=5 chars=ascii_lowercase,digits seed=inventory_hostname') }}" uid: "{{ lookup('ansible.builtin.password', '/dev/null length=5 chars=ascii_lowercase,digits seed=inventory_hostname') }}"
privatekey: "{{ lookup('ansible.builtin.file', '~/.ssh/git_rsa_id') | indent(4, true) }}" privatekey: "{{ lookup('ansible.builtin.file', '~/.ssh/git_rsa_id') | indent(4, true) }}"
notify:
- Apply manifests
- name: Trigger handlers
ansible.builtin.meta: flush_handlers
module_defaults: module_defaults:
ansible.builtin.uri: ansible.builtin.uri:

View File

@ -55,7 +55,6 @@
docker-archive:./{{ ( item | regex_findall('[^/:]+'))[-2] }}.tar:{{ item }} docker-archive:./{{ ( item | regex_findall('[^/:]+'))[-2] }}.tar:{{ item }}
chdir: /opt/metacluster/container-images 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 }}"
# loop: "{{ (containerimages.results | map(attribute='stdout_lines') | flatten) }}"
# - name: Inject manifests # - name: Inject manifests
# ansible.builtin.template: # ansible.builtin.template:
@ -67,6 +66,11 @@
# loop: "{{ lookup('ansible.builtin.dict', components) | map(attribute='value.manifests') | list | select('defined') | flatten }}" # loop: "{{ lookup('ansible.builtin.dict', components) | map(attribute='value.manifests') | list | select('defined') | flatten }}"
# loop_control: # loop_control:
# label: "{{ item.type + '/' + item.name }}" # label: "{{ item.type + '/' + item.name }}"
# notify:
# - Apply manifests
# - name: Trigger handlers
# ansible.builtin.meta: flush_handlers
- name: Compress tarballs - name: Compress tarballs
community.general.archive: community.general.archive:

View File

@ -38,3 +38,8 @@
loop: "{{ platform.packaged_components }}" loop: "{{ platform.packaged_components }}"
loop_control: loop_control:
label: "{{ item.name }}" label: "{{ item.name }}"
notify:
- Apply manifests
- name: Trigger handlers
ansible.builtin.meta: flush_handlers

View File

@ -150,5 +150,6 @@ dependencies:
- lvm2 - lvm2
pip: pip:
- jmespath - jmespath
- kubernetes
- passlib - passlib
- pyvmomi - pyvmomi