Housekeeping; Change to async processing
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Some checks reported errors
continuous-integration/drone/push Build encountered an error
This commit is contained in:
parent
378a584b14
commit
e4bf846a57
20
playbook.yml
20
playbook.yml
@ -4,10 +4,12 @@
|
||||
- hypervisor.vcenter.yml
|
||||
- cluster.k3s.yml
|
||||
tasks:
|
||||
|
||||
- name: Download OVF-template
|
||||
ansible.builtin.get_url:
|
||||
url: "https://{{ repo_username }}:{{ repo_password }}@{{ image.ova_url }}"
|
||||
dest: /scratch/image.ova
|
||||
|
||||
- name: Deploy VMs from OVF-template
|
||||
community.vmware.vmware_deploy_ovf:
|
||||
hostname: "{{ hv.hostname }}"
|
||||
@ -34,9 +36,21 @@
|
||||
guestinfo.prefixlength: "{{ item.ip | ansible.utils.ipaddr('prefix') }}"
|
||||
guestinfo.dnsserver: "{{ network.dnsserver }}"
|
||||
guestinfo.gateway: "{{ network.gateway }}"
|
||||
# customization_spec: "{{ customization_spec }}"
|
||||
delegate_to: localhost
|
||||
with_items: "{{ servers }}"
|
||||
register: result
|
||||
register: job_init
|
||||
async: 150
|
||||
poll: 0
|
||||
|
||||
- name: Poll for completion
|
||||
ansible.builtin.async_status:
|
||||
id: "{{ item.ansible_job_id }}"
|
||||
with_items: "{{ job_init.results }}"
|
||||
register: job_poll
|
||||
retries: 5
|
||||
delay: 30
|
||||
until: job_poll.finished
|
||||
|
||||
- ansible.builtin.debug:
|
||||
msg: result
|
||||
msg: "{{ job_init }} {{ job_poll }}"
|
||||
|
||||
|
@ -10,8 +10,5 @@ network:
|
||||
gateway: 192.168.11.1
|
||||
servers:
|
||||
- ip: 192.168.11.121/24
|
||||
guest_id: ubuntu64Guest
|
||||
- ip: 192.168.11.122/24
|
||||
guest_id: ubuntu64Guest
|
||||
- ip: 192.168.11.123/24
|
||||
guest_id: ubuntu64Guest
|
||||
|
Loading…
Reference in New Issue
Block a user