Revert dict attribute;Move template;Add missing template attribute;Fix unique id in loop
continuous-integration/drone/push Build is failing Details

This commit is contained in:
Danny Bessems 2022-11-17 10:17:17 +01:00
parent 83ee632ff9
commit 44daf9191a
4 changed files with 5 additions and 6 deletions

View File

@ -10,13 +10,14 @@
infrastructure_vsphere: "{{ components.clusterapi.management.version.infrastructure_vsphere }}"
hv:
fqdn: "{{ vapp['hv.fqdn'] }}"
tlsthumbprint: "{{ vcenter_info.tls_thumbprint }}"
tlsthumbprint: "{{ tls_thumbprint.stdout }}"
username: "{{ vapp['hv.username'] }}"
password: "{{ vapp['hv.password'] }}"
datacenter: "{{ vcenter_info.datacenter }}"
datastore: "{{ vcenter_info.datastore }}"
network: "{{ vcenter_info.network }}"
resourcepool: "{{ vcenter_info.resourcepool }}"
folder: "{{ vcenter_info.folder }}"
cluster:
nodetemplate: "{{ (components.clusterapi.workload.node_template.name | split('.'))[:-1] | join('.') }}"
publickey: "{{ vapp['guestinfo.rootsshkey'] }}"

View File

@ -51,7 +51,7 @@
- name: Store hypervisor details in dictionary
ansible.builtin.set_fact:
vcenter_info: "{{ vcenter_info | default({}) | combine({ item.item.attribute : item.stdout }) | combine({ 'tls_thumbprint': tls_thumbprint.stdout }) }}"
vcenter_info: "{{ vcenter_info | default({}) | combine({ item.item.attribute : item.stdout }) }}"
loop: "{{ govc_inventory.results }}"
loop_control:
label: "{{ item.item.attribute }}"

View File

@ -27,7 +27,7 @@ VSPHERE_DATASTORE: "{{ _template.hv.datastore }}"
VSPHERE_STORAGE_POLICY: ""
VSPHERE_NETWORK: "{{ _template.hv.network }}"
VSPHERE_RESOURCE_POOL: "{{ _template.hv.resourcepool }}"
VSPHERE_FOLDER: ""
VSPHERE_FOLDER: "{{ _template.hv.folder }}"
VSPHERE_TEMPLATE: "{{ _template.cluster.nodetemplate }}"
VSPHERE_SSH_AUTHORIZED_KEY: "{{ _template.cluster.publickey }}"

View File

@ -110,10 +110,8 @@
--insecure-policy \
--retry-times=5 \
docker://{{ item }} \
docker-archive:./{{ ( item | regex_findall('[^/:]+'))[-2] }}_{{ uid }}.tar:{{ item }}
docker-archive:./{{ ( item | regex_findall('[^/:]+'))[-2] }}_{{ lookup('ansible.builtin.password', '/dev/null length=5 chars=ascii_lowercase,digits seed=item') }}.tar:{{ item }}
chdir: /opt/metacluster/container-images
vars:
uid: "{{ lookup('ansible.builtin.password', '/dev/null length=5 chars=ascii_lowercase,digits seed=item') }}"
loop: "{{ ((containerimages.results | map(attribute='stdout_lines') | select('defined') | flatten) + dependencies.container_images + (clusterapi_containerimages | list)) | unique }}"
# - name: Inject manifests