Does any know if community.general.proxmox module supports or works properly with proxmox 8?
Management of instances in Proxmox VE clusterI wrote a basic role based of one of the examples. But get
msg": "Creation of lxc VM 901 failed with exception: 400 Bad Request: Parameter verification failed.",
"vmid": 901
Any help or suggestion is appreciated.
cat roles/create-container/tasks/main.yml
cat roles/create-container/vars/main.yml
ansible-playbook -i inventory create_container.yml -vvv
Management of instances in Proxmox VE clusterI wrote a basic role based of one of the examples. But get
msg": "Creation of lxc VM 901 failed with exception: 400 Bad Request: Parameter verification failed.",
"vmid": 901
Any help or suggestion is appreciated.
cat roles/create-container/tasks/main.yml
Code:
- name: Create new container automatically selecting the next available vmid.
community.general.proxmox:
node: "{{ pve_node }}"
api_user: 'lxc1@pve'
api_password: 'password_here'
api_host: 'pve2'
vmid: 901
password: 'password'
hostname: 'hoste1'
ostemplate: 'vm_data2:vztmpl/rockylinux-9-default_20221109_amd64.tar.xz'
cat roles/create-container/vars/main.yml
ansible-playbook -i inventory create_container.yml -vvv
Code:
The full traceback is:
File "/tmp/ansible_community.general.proxmox_payload_z6akafqp/ansible_community.general.proxmox_payload.zip/ansible_collections/community/general/plugins/modules/proxmox.py", line 880, in main
File "/tmp/ansible_community.general.proxmox_payload_z6akafqp/ansible_community.general.proxmox_payload.zip/ansible_collections/community/general/plugins/modules/proxmox.py", line 661, in create_instance
File "/usr/lib/python3/dist-packages/proxmoxer/core.py", line 135, in create
return self.post(*args, **data)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/proxmoxer/core.py", line 126, in post
return self(args)._request("POST", data=data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3/dist-packages/proxmoxer/core.py", line 105, in _request
raise ResourceException(
fatal: [pve2.foo.lan]: FAILED! => {
"changed": false,
"invocation": {
"module_args": {
"api_host": "pve2",
"api_password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"api_token_id": null,
"api_token_secret": null,
"api_user": "lxc1@pve",
"clone": null,
"clone_type": "opportunistic",
"cores": null,
"cpus": null,
"cpuunits": null,
"description": null,
"disk": null,
"features": null,
"force": false,
"hookscript": null,
"hostname": "host1",
"ip_address": null,
"memory": null,
"mounts": null,
"nameserver": null,
"netif": null,
"node": "pve2",
"onboot": null,
"ostemplate": "vm_data2:vztmpl/rockylinux-9-default_20221109_amd64.tar.xz",
"ostype": "auto",
"password": "VALUE_SPECIFIED_IN_NO_LOG_PARAMETER",
"pool": null,
"proxmox_default_behavior": "no_defaults",
"pubkey": null,
"purge": false,
"searchdomain": null,
"state": "present",
"storage": "local",
"swap": null,
"tags": null,
"timeout": 30,
"timezone": null,
"unprivileged": true,
"update": false,
"validate_certs": false,
"vmid": 901
}
},
"msg": "Creation of lxc VM 901 failed with exception: 400 Bad Request: Parameter verification failed.",
"vmid": 901
}
YAML:
---
# vars file for roles/create-container
pve_node: pve2
Last edited: