Add missing keys
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Danny Bessems 2023-03-16 09:15:05 +01:00
parent ad0c511651
commit ff555ce0de
2 changed files with 19 additions and 18 deletions

View File

@ -25,7 +25,6 @@
community.vmware.vmware_deploy_ovf: community.vmware.vmware_deploy_ovf:
cluster: "{{ vcenter_info.cluster }}" cluster: "{{ vcenter_info.cluster }}"
datastore: "{{ vcenter_info.datastore }}" datastore: "{{ vcenter_info.datastore }}"
folder: "{{ vcenter_info.folder }}"
name: "{{ (item | basename | split('.'))[:-1] | join('.') }}" name: "{{ (item | basename | split('.'))[:-1] | join('.') }}"
networks: "{u'{{ ova_spec.results[index].stdout | from_json | json_query('NetworkMapping[0].Name') }}':u'{{ vcenter_info.network }}'}" networks: "{u'{{ ova_spec.results[index].stdout | from_json | json_query('NetworkMapping[0].Name') }}':u'{{ vcenter_info.network }}'}"
allow_duplicates: no allow_duplicates: no
@ -37,26 +36,25 @@
loop_control: loop_control:
index_var: index index_var: index
- name: Add vApp properties on deployed VM's # - name: Add vApp properties on deployed VM's
ansible.builtin.shell: # ansible.builtin.shell:
cmd: >- # cmd: >-
npp-prepper \ # npp-prepper \
--server "{{ vapp['hv.fqdn'] }}" \ # --server "{{ vapp['hv.fqdn'] }}" \
--username "{{ vapp['hv.username'] }}" \ # --username "{{ vapp['hv.username'] }}" \
--password "{{ vapp['hv.password'] }}" \ # --password "{{ vapp['hv.password'] }}" \
vm \ # vm \
--datacenter "{{ vcenter_info.datacenter }}" \ # --datacenter "{{ vcenter_info.datacenter }}" \
--portgroup "{{ vcenter_info.network }}" \ # --portgroup "{{ vcenter_info.network }}" \
--name "{{ item.instance.hw_name }}" # --name "{{ item.instance.hw_name }}"
when: existing_ova.results[index] is failed # when: existing_ova.results[index] is failed
loop: "{{ ova_deploy.results }}" # loop: "{{ ova_deploy.results }}"
loop_control: # loop_control:
index_var: index # index_var: index
label: "{{ item.item }}" # label: "{{ item.item }}"
- name: Create snapshot on deployed VM's - name: Create snapshot on deployed VM's
community.vmware.vmware_guest_snapshot: community.vmware.vmware_guest_snapshot:
folder: "{{ vcenter_info.folder }}"
name: "{{ item.instance.hw_name }}" name: "{{ item.instance.hw_name }}"
state: present state: present
snapshot_name: "{{ ansible_date_time.iso8601_basic_short }}-base" snapshot_name: "{{ ansible_date_time.iso8601_basic_short }}-base"
@ -83,3 +81,4 @@
username: "{{ vapp['hv.username'] }}" username: "{{ vapp['hv.username'] }}"
password: "{{ vapp['hv.password'] }}" password: "{{ vapp['hv.password'] }}"
datacenter: "{{ vcenter_info.datacenter }}" datacenter: "{{ vcenter_info.datacenter }}"
folder: "{{ vcenter_info.folder }}"

View File

@ -59,6 +59,8 @@ patchesStrategicMerge:
- apiGroup: ipam.cluster.x-k8s.io - apiGroup: ipam.cluster.x-k8s.io
kind: InClusterIPPool kind: InClusterIPPool
name: inclusterippool-${CLUSTER_NAME} name: inclusterippool-${CLUSTER_NAME}
nameservers:
- {{ _template.network.dnsserver }}
networkName: '${VSPHERE_NETWORK}' networkName: '${VSPHERE_NETWORK}'
- |- - |-
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1 apiVersion: infrastructure.cluster.x-k8s.io/v1beta1