Refactor vApp properties;Add dependency
Some checks reported errors
continuous-integration/drone/push Build was killed

This commit is contained in:
Danny Bessems 2022-12-22 19:44:33 +01:00
parent 78c1d7fb54
commit b67bc43a70
2 changed files with 11 additions and 13 deletions

View File

@ -38,19 +38,15 @@
index_var: index
- name: Add vApp properties on deployed VM's
community.vmware.vmware_guest:
name: "{{ item.instance.hw_name }}"
vapp_properties:
- id: guestinfo.dns.servers
value: ${dns:{{ vcenter_info.network }}}
- id: guestinfo.dns.domains
value: ${searchPath:{{ vcenter_info.network }}}
- id: guestinfo.interface.0.ip.0.address
value: ip:{{ vcenter_info.network }}
- id: guestinfo.interface.0.ip.0.netmask
value: ${netmask:{{ vcenter_info.network }}}
- id: guestinfo.interface.0.route.0.gateway
value: ${gateway:{{ vcenter_info.network }}}
ansible.builtin.shell:
cmd: >-
vappproperty-manager \
-server {{ vapp['hv.fqdn'] }} \
-username {{ vapp['hv.username'] }} \
-password {{ vapp['hv.password'] }} \
-dc {{ vcenter_info.datacenter }} \
-network {{ vcenter_info.network }} \
-vm {{ item.instance.hw_name }}
when: existing_ova.results[index] is failed
loop: "{{ ova_deploy.results }}"
loop_control:

View File

@ -244,6 +244,8 @@ dependencies:
extra_opts: --strip-components=2
- filename: yq
url: http://github.com/mikefarah/yq/releases/download/v4.30.5/yq_linux_amd64
- filename: vappprop-manager
url: https://code.spamasaurus.com/api/packages/djpbessems/generic/vappprop-manager/v0.1.0/vappprop-manager
packages:
apt: