async for common VMs (untested)

This commit is contained in:
abrown38 committed 2024-04-16 19:16:06 +00:00
1 parent f04f4365fb
commit 9c4f61b3b2
1 file changed
+16 -1
+16 -1
View File
@@ -220,7 +220,8 @@
delay: 60 delay: 60
when: 'async_gpu.skipped == false' when: 'async_gpu.skipped == false'
- name: Common VMs
block:
- name: Create Common VMs (DCs, Fileservers, WSUS, Chocolatey) - name: Create Common VMs (DCs, Fileservers, WSUS, Chocolatey)
openstack.cloud.server: openstack.cloud.server:
name: "{{ item.name }}" name: "{{ item.name }}"
@@ -248,4 +249,18 @@
$admin.PSBase.Invoke("SetPassword", "{{ vm_initial_password }}") $admin.PSBase.Invoke("SetPassword", "{{ vm_initial_password }}")
Invoke-Expression ((New-Object System.Net.Webclient).DownloadString('https://raw.githubusercontent.com/ansible/ansible-documentation/devel/examples/scripts/ConfigureRemotingForAnsible.ps1')) Invoke-Expression ((New-Object System.Net.Webclient).DownloadString('https://raw.githubusercontent.com/ansible/ansible-documentation/devel/examples/scripts/ConfigureRemotingForAnsible.ps1'))
loop: "{{ standard_vms }}" loop: "{{ standard_vms }}"
async: 900
poll: 0
- name: Wait for common VMs to build
os_server_info:
name: "{{ os_project }}-{{ win_project }}-*"
filters:
metadata:
type: server
vm_state: active
register: common_status
until: 'common_status.servers|length == 6'
retries: 100
delay: 60
# Add async to this task for speed. can openstack handle 6 at once or split 3 3??? # Add async to this task for speed. can openstack handle 6 at once or split 3 3???