Sort fileglob loops;Fix filter parameter;Remove redundant key;Fix multiline key/value pairs;Add helm-adopt labels
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
1141225907
commit
7b17b8ad63
@ -20,5 +20,5 @@
|
|||||||
src: "{{ item }}"
|
src: "{{ item }}"
|
||||||
state: present
|
state: present
|
||||||
kubeconfig: "{{ kubeconfig.path }}"
|
kubeconfig: "{{ kubeconfig.path }}"
|
||||||
with_fileglob: /var/lib/rancher/k3s/server/manifests/*.yaml
|
loop: "{{ query('ansible.builtin.fileglob', '/var/lib/rancher/k3s/server/manifests/*.yaml') | sort }}"
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
|
@ -2,4 +2,4 @@
|
|||||||
ansible.builtin.command:
|
ansible.builtin.command:
|
||||||
cmd: k3s ctr image import {{ item }}
|
cmd: k3s ctr image import {{ item }}
|
||||||
chdir: /opt/metacluster/container-images
|
chdir: /opt/metacluster/container-images
|
||||||
with_fileglob: /opt/metacluster/container-images/*.tar
|
loop: "{{ query('ansible.builtin.fileglob', '/opt/metacluster/container-images/*.tar') | sort }}"
|
||||||
|
@ -35,15 +35,18 @@
|
|||||||
_template:
|
_template:
|
||||||
name: "{{ item.name }}"
|
name: "{{ item.name }}"
|
||||||
namespace: "{{ item.namespace }}"
|
namespace: "{{ item.namespace }}"
|
||||||
labels: "{{ item.labels | default({}) | indent(width=4, indent=True) }}"
|
labels: "{{ item.labels | default('{}') | indent(width=4, first=True) }}"
|
||||||
data: "{{ item.data }}"
|
data: "{{ item.data }}"
|
||||||
loop:
|
loop:
|
||||||
- name: argocd-tls-certs-cm
|
- name: argocd-tls-certs-cm
|
||||||
namespace: argo-cd
|
namespace: argo-cd
|
||||||
kind: configmap
|
kind: configmap
|
||||||
labels: |
|
labels: |
|
||||||
|
app.kubernetes.io/managed-by: Helm
|
||||||
app.kubernetes.io/name: argocd-cm
|
app.kubernetes.io/name: argocd-cm
|
||||||
app.kubernetes.io/part-of: argocd
|
app.kubernetes.io/part-of: argocd
|
||||||
|
meta.helm.sh/release-name: argo-cd
|
||||||
|
meta.helm.sh/release-namespace: argo-cd
|
||||||
data:
|
data:
|
||||||
- key: git.{{ vapp['metacluster.fqdn'] }}
|
- key: git.{{ vapp['metacluster.fqdn'] }}
|
||||||
value: "{{ stepca_cm_certs.resources[0].data['root_ca.crt'] }}"
|
value: "{{ stepca_cm_certs.resources[0].data['root_ca.crt'] }}"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
- name: Create component entries in /etc/hosts
|
- name: Configure fallback name resolution
|
||||||
ansible.builtin.lineinfile:
|
ansible.builtin.lineinfile:
|
||||||
path: /etc/hosts
|
path: /etc/hosts
|
||||||
line: "{{ vapp['guestinfo.ipaddress'] }} {{ item + '.' + vapp['metacluster.fqdn'] }}"
|
line: "{{ vapp['guestinfo.ipaddress'] }} {{ item + '.' + vapp['metacluster.fqdn'] }}"
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
docker-archive:./{{ item | basename }} | \
|
docker-archive:./{{ item | basename }} | \
|
||||||
jq -r '.Tags[0]')
|
jq -r '.Tags[0]')
|
||||||
chdir: /opt/metacluster/container-images/
|
chdir: /opt/metacluster/container-images/
|
||||||
with_fileglob: /opt/metacluster/container-images/*.tar
|
loop: "{{ query('ansible.builtin.fileglob', '/opt/metacluster/container-images/*.tar') | sort }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item | basename }}"
|
label: "{{ item | basename }}"
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
release_namespace: kube-system
|
release_namespace: kube-system
|
||||||
wait: yes
|
wait: yes
|
||||||
kubeconfig: "{{ kubeconfig.path }}"
|
kubeconfig: "{{ kubeconfig.path }}"
|
||||||
values: "{{ components.sealedsecrets.chart_values }}"
|
# values: "{{ components.sealedsecrets.chart_values }}"
|
||||||
|
|
||||||
- name: Store hypervisor details in secret
|
- name: Store hypervisor details in secret
|
||||||
kubernetes.core.k8s:
|
kubernetes.core.k8s:
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
community.vmware.vmware_guest_info:
|
community.vmware.vmware_guest_info:
|
||||||
name: "{{ (item | basename | split('.'))[:-1] | join('.') }}"
|
name: "{{ (item | basename | split('.'))[:-1] | join('.') }}"
|
||||||
register: existing_ova
|
register: existing_ova
|
||||||
with_fileglob: /opt/workloadcluster/node-templates/*.ova
|
loop: "{{ query('ansible.builtin.fileglob', '/opt/workloadcluster/node-templates/*.ova') | sort }}"
|
||||||
ignore_errors: yes
|
ignore_errors: yes
|
||||||
|
|
||||||
- name: Parse OVA files for network mappings
|
- name: Parse OVA files for network mappings
|
||||||
@ -67,7 +67,7 @@
|
|||||||
GOVC_PASSWORD: "{{ vapp['hv.password'] }}"
|
GOVC_PASSWORD: "{{ vapp['hv.password'] }}"
|
||||||
register: ova_spec
|
register: ova_spec
|
||||||
when: existing_ova.results[index] is failed
|
when: existing_ova.results[index] is failed
|
||||||
with_fileglob: /opt/workloadcluster/node-templates/*.ova
|
loop: "{{ query('ansible.builtin.fileglob', '/opt/workloadcluster/node-templates/*.ova') | sort }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
index_var: index
|
index_var: index
|
||||||
|
|
||||||
@ -83,7 +83,7 @@
|
|||||||
ovf: "{{ item }}"
|
ovf: "{{ item }}"
|
||||||
register: ova_deploy
|
register: ova_deploy
|
||||||
when: existing_ova.results[index] is failed
|
when: existing_ova.results[index] is failed
|
||||||
with_fileglob: /opt/workloadcluster/node-templates/*.ova
|
loop: "{{ query('ansible.builtin.fileglob', '/opt/workloadcluster/node-templates/*.ova') | sort }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
index_var: index
|
index_var: index
|
||||||
|
|
||||||
|
@ -7,5 +7,5 @@ metadata:
|
|||||||
{{ _template.labels }}
|
{{ _template.labels }}
|
||||||
data:
|
data:
|
||||||
{% for kv_pair in _template.data %}
|
{% for kv_pair in _template.data %}
|
||||||
"{{ kv_pair.key }}": {{ kv_pair.value }}
|
"{{ kv_pair.key }}": "{{ kv_pair.value }}"
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
Loading…
Reference in New Issue
Block a user