╰─ ansible-playbook -vvvv deploy_vm.yml
ansible-playbook [core 2.15.5]
config file = /Users/bor/git/ansible/pr_manage_pb/ansible.cfg
configured module search path = ['/Users/bor/git/ansible/pr_manage_pb/modules']
ansible python module location = /opt/homebrew/Cellar/ansible/8.5.0_1/libexec/lib/python3.11/site-packages/ansible
ansible collection location = /Users/bor/git/ansible/pr_manage_pb/collections
executable location = /opt/homebrew/bin/ansible-playbook
python version = 3.11.6 (main, Oct 2 2023, 13:45:54) [Clang 15.0.0 (clang-1500.0.40.1)] (/opt/homebrew/Cellar/ansible/8.5.0_1/libexec/bin/python)
jinja version = 3.1.2
libyaml = True
Using /Users/bor/git/ansible/pr_manage_pb/ansible.cfg as config file
setting up inventory plugins
Loading collection ansible.builtin from
host_list declined parsing /Users/bor/git/ansible/pr_manage_pb/inventory.ini as it did not pass its verify_file() method
script declined parsing /Users/bor/git/ansible/pr_manage_pb/inventory.ini as it did not pass its verify_file() method
auto declined parsing /Users/bor/git/ansible/pr_manage_pb/inventory.ini as it did not pass its verify_file() method
yaml declined parsing /Users/bor/git/ansible/pr_manage_pb/inventory.ini as it did not pass its verify_file() method
Parsed /Users/bor/git/ansible/pr_manage_pb/inventory.ini inventory source with ini plugin
Loading collection community.vmware from /opt/homebrew/Cellar/ansible/8.5.0_1/libexec/lib/python3.11/site-packages/ansible_collections/community/vmware
redirecting (type: callback) ansible.builtin.debug to ansible.posix.debug
Loading collection ansible.posix from /opt/homebrew/Cellar/ansible/8.5.0_1/libexec/lib/python3.11/site-packages/ansible_collections/ansible/posix
redirecting (type: callback) ansible.builtin.debug to ansible.posix.debug
Loading callback plugin ansible.posix.debug of type stdout, v2.0 from /opt/homebrew/Cellar/ansible/8.5.0_1/libexec/lib/python3.11/site-packages/ansible_collections/ansible/posix/plugins/callback/debug.py
redirecting (type: callback) ansible.builtin.timer to ansible.posix.timer
redirecting (type: callback) ansible.builtin.profile_tasks to ansible.posix.profile_tasks
Skipping callback 'default', as we already have a stdout callback.
Skipping callback 'minimal', as we already have a stdout callback.
Skipping callback 'oneline', as we already have a stdout callback.
Loading callback plugin ansible.posix.timer of type aggregate, v2.0 from /opt/homebrew/Cellar/ansible/8.5.0_1/libexec/lib/python3.11/site-packages/ansible_collections/ansible/posix/plugins/callback/timer.py
Loading callback plugin ansible.posix.profile_tasks of type aggregate, v2.0 from /opt/homebrew/Cellar/ansible/8.5.0_1/libexec/lib/python3.11/site-packages/ansible_collections/ansible/posix/plugins/callback/profile_tasks.py
PLAYBOOK: deploy_vm.yml *******************************************************************************************
Positional arguments: deploy_vm.yml
verbosity: 4
connection: smart
timeout: 10
become_method: sudo
tags: ('all',)
inventory: ('/Users/bor/git/ansible/pr_manage_pb/inventory.ini',)
forks: 5
1 plays in deploy_vm.yml
Trying secret FileVaultSecret(filename='/Users/bor/git/ansible/.pr_manage_pb_vaultpass') for vault_id=default
Read vars_file './vcenter_vault.yml'
Trying secret FileVaultSecret(filename='/Users/bor/git/ansible/.pr_manage_pb_vaultpass') for vault_id=default
Read vars_file './vcenter_vault.yml'
Trying secret FileVaultSecret(filename='/Users/bor/git/ansible/.pr_manage_pb_vaultpass') for vault_id=default
Read vars_file './vcenter_vault.yml'
PLAY [localhost] **************************************************************************************************
Trying secret FileVaultSecret(filename='/Users/bor/git/ansible/.pr_manage_pb_vaultpass') for vault_id=default
Read vars_file './vcenter_vault.yml'
Trying secret FileVaultSecret(filename='/Users/bor/git/ansible/.pr_manage_pb_vaultpass') for vault_id=default
Read vars_file './vcenter_vault.yml'
Trying secret FileVaultSecret(filename='/Users/bor/git/ansible/.pr_manage_pb_vaultpass') for vault_id=default
Read vars_file './vcenter_vault.yml'
TASK [Create a virtual machine] ***********************************************************************************
task path: /Users/bor/git/ansible/pr_manage_pb/deploy_vm.yml:8
Saturday 11 November 2023 20:50:39 +0100 (0:00:00.051) 0:00:00.051 *****
Trying secret FileVaultSecret(filename='/Users/bor/git/ansible/.pr_manage_pb_vaultpass') for vault_id=default
Read vars_file './vcenter_vault.yml'
<localhost> ESTABLISH LOCAL CONNECTION FOR USER: bor
<localhost> EXEC /bin/sh -c '( umask 77 && mkdir -p "` echo /tmp/$USER/ansible `"&& mkdir "` echo /tmp/$USER/ansible/ansible-tmp-1699732239.532284-2072-173201278915607 `" && echo ansible-tmp-1699732239.532284-2072-173201278915607="` echo /tmp/$USER/ansible/ansible-tmp-1699732239.532284-2072-173201278915607 `" ) && sleep 0'
Using module file /opt/homebrew/Cellar/ansible/8.5.0_1/libexec/lib/python3.11/site-packages/ansible_collections/community/vmware/plugins/modules/vmware_guest.py
<localhost> PUT /Users/bor/.ansible/tmp/ansible-local-2069_a0fnsza/tmpd_y7bae_ TO /private/tmp/bor/ansible/ansible-tmp-1699732239.532284-2072-173201278915607/AnsiballZ_vmware_guest.py
<localhost> EXEC /bin/sh -c 'chmod u+x /tmp/bor/ansible/ansible-tmp-1699732239.532284-2072-173201278915607/ /tmp/bor/ansible/ansible-tmp-1699732239.532284-2072-173201278915607/AnsiballZ_vmware_guest.py && sleep 0'
<localhost> EXEC /bin/sh -c '/opt/homebrew/Cellar/ansible/8.5.0_1/libexec/bin/python /tmp/bor/ansible/ansible-tmp-1699732239.532284-2072-173201278915607/AnsiballZ_vmware_guest.py && sleep 0'
<localhost> EXEC /bin/sh -c 'rm -f -r /tmp/bor/ansible/ansible-tmp-1699732239.532284-2072-173201278915607/ > /dev/null 2>&1 && sleep 0'
fatal: [localhost]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"advanced_settings": [],
"annotation": null,
"cdrom": [],
"cluster": "esxi.internal.borsdomain.net",
"convert": null,
"customization": {
"autologon": null,
"autologoncount": null,
"dns_servers": null,
"dns_suffix": null,
"domain": null,
"domainadmin": null,
"domainadminpassword": null,
"existing_vm": null,
"fullname": null,
"hostname": null,
"hwclockUTC": null,
"joindomain": null,
"joinworkgroup": null,
"orgname": null,
"password": null,
"productid": null,
"runonce": null,
"script_text": null,
"timezone": null
},
"customization_spec": null,
"customvalues": [],
"datacenter": "attic",
"datastore": "nfs_ds_data",
"delete_from_inventory": false,
"disk": [
{
"autoselect_datastore": null,
"controller_number": null,
"controller_type": null,
"datastore": null,
"disk_mode": null,
"filename": null,
"size": null,
"size_gb": 120,
"size_kb": null,
"size_mb": null,
"size_tb": null,
"type": "thin",
"unit_number": null
}
],
"encryption": {
"encrypted_ft": null,
"encrypted_vmotion": null
},
"esxi_hostname": null,
"folder": "/lab",
"force": false,
"guest_id": "rockylinux_64Guest",
"hardware": {
"boot_firmware": null,
"cpu_limit": null,
"cpu_reservation": null,
"cpu_shares": null,
"cpu_shares_level": null,
"hotadd_cpu": null,
"hotadd_memory": null,
"hotremove_cpu": null,
"iommu": null,
"max_connections": null,
"mem_limit": null,
"mem_reservation": null,
"mem_shares": null,
"mem_shares_level": null,
"memory_mb": 4096,
"memory_reservation_lock": null,
"nested_virt": null,
"num_cpu_cores_per_socket": null,
"num_cpus": 2,
"scsi": "paravirtual",
"secure_boot": null,
"version": null,
"virt_based_security": null,
"vpmc_enabled": null
},
"hostname": "vcenter.internal.borsdomain.net",
"is_template": false,
"linked_clone": false,
"name": "test_vm_0001",
"name_match": "first",
"networks": [
{
"device_type": "vmxnet3",
"name": "pg_vmnet_lan"
}
],
"nvdimm": {
"label": null,
"size_mb": 1024,
"state": null
},
"password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"port": 443,
"proxy_host": null,
"proxy_port": null,
"resource_pool": null,
"snapshot_src": null,
"state": "poweredon",
"state_change_timeout": 0,
"template": null,
"use_instance_uuid": false,
"username": "ansible@vsphere.local",
"uuid": null,
"validate_certs": false,
"vapp_properties": [],
"wait_for_customization": false,
"wait_for_customization_timeout": 3600,
"wait_for_ip_address": false,
"wait_for_ip_address_timeout": 300
}
}
}
MSG:
Network 'pg_vmnet_lan' does not exist.
PLAY RECAP ********************************************************************************************************
localhost : ok=0 changed=0 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0
Playbook run took 0 days, 0 hours, 0 minutes, 0 seconds
Saturday 11 November 2023 20:50:39 +0100 (0:00:00.483) 0:00:00.534 *****
===============================================================================
Create a virtual machine ----------------------------------------------------------------------------------- 0.48s
/Users/bor/git/ansible/pr_manage_pb/deploy_vm.yml:8 ----------------------------------------------------------