From 277c91eebace50e3c683907b1112877f120cd3dd Mon Sep 17 00:00:00 2001 From: Danny Bessems Date: Fri, 29 Jul 2022 11:39:39 +0200 Subject: [PATCH] Fix module name;Add indentation;Update dependencies #2 --- .../roles/workloadcluster/tasks/main.yml | 12 ++++++------ ansible/vars/metacluster.yml | 6 +++--- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ansible/roles/firstboot/files/ansible_payload/roles/workloadcluster/tasks/main.yml b/ansible/roles/firstboot/files/ansible_payload/roles/workloadcluster/tasks/main.yml index 9df73f7..b0b4c8c 100644 --- a/ansible/roles/firstboot/files/ansible_payload/roles/workloadcluster/tasks/main.yml +++ b/ansible/roles/firstboot/files/ansible_payload/roles/workloadcluster/tasks/main.yml @@ -13,7 +13,7 @@ - attribute: cluster moref: >- $(govc object.collect -json VirtualMachine:{{ moref_id }} | \ - jq -r '.[] | select(.Name == "runtime").Val.Host | .Type + ":" + .Value') + jq -r '.[] | select(.Name == "runtime").Val.Host | .Type + ":" + .Value') part: (NF-1) - attribute: datacenter moref: VirtualMachine:{{ moref_id }} @@ -21,22 +21,22 @@ - attribute: datastore moref: >- $(govc object.collect -json VirtualMachine:{{ moref_id }} | \ - jq -r '.[] | select(.Name == "datastore").Val.ManagedObjectReference | .[].Type + ":" + .[].Value') + jq -r '.[] | select(.Name == "datastore").Val.ManagedObjectReference | .[].Type + ":" + .[].Value') part: NF - attribute: folder moref: >- $(govc object.collect -json VirtualMachine:{{ moref_id }} | \ - jq -r '.[] | select(.Name == "parent").Val | .Type + ":" + .Value') + jq -r '.[] | select(.Name == "parent").Val | .Type + ":" + .Value') part: 0 # - attribute: host # moref: >- # $(govc object.collect -json VirtualMachine:{{ moref_id }} | \ - # jq -r '.[] | select(.Name == "runtime").Val.Host | .Type + ":" + .Value') + # jq -r '.[] | select(.Name == "runtime").Val.Host | .Type + ":" + .Value') # part: NF - attribute: network moref: >- $(govc object.collect -json VirtualMachine:{{ moref_id }} | \ - jq -r '.[] | select(.Name == "network").Val.ManagedObjectReference | .[].Type + ":" + .[].Value') + jq -r '.[] | select(.Name == "network").Val.ManagedObjectReference | .[].Type + ":" + .[].Value') part: NF loop_control: label: "{{ item.attribute }}" @@ -62,7 +62,7 @@ with_fileglob: /opt/workloadcluster/node-templates/*.ova - name: Deploy OVA templates on hypervisor - community.vmware.vmware_ovf_deploy: + community.vmware.vmware_deploy_ovf: hostname: "{{ vapp['hv.fqdn'] }}" validate_certs: no username: "{{ vapp['hv.username'] }}" diff --git a/ansible/vars/metacluster.yml b/ansible/vars/metacluster.yml index 3f4d1f7..df1142c 100644 --- a/ansible/vars/metacluster.yml +++ b/ansible/vars/metacluster.yml @@ -124,11 +124,11 @@ dependencies: - ansible.utils - community.crypto - community.general + - community.vmware - kubernetes.core - - vmware.vmware_rest # container_images: - # - quay.io/skopeo/stable:v1.8.0 + # - static_binaries: - filename: govc @@ -147,6 +147,6 @@ dependencies: packages: - lvm2 - - python3-dnspython - python3-jmespath - python3-passlib + - python3-pyvmomi