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

This commit is contained in:
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 }}"