Open christianhahnsft22 opened 4 days ago
Hi. If NUMBER_CPU
is not set in environ lookup
will return empty string, and int
will convert it to number 0. Provide a default value for this case - jumphost_cpus: "{{ lookup('env', 'NUMBER_CPU') or 2 | int }}"
.
I'm trying to pass in the number of vcpu via an environment variable like this:
jumphost_cpus: "{{ lookup('env', 'NUMBER_CPU') | int}}"
fatal: [localhost]: FAILED! => {"changed": false, "msg": "There was a problem during this task execution. Task details: {\"taskTag\": \"316\", \"progressPercent\": 50, \"state\": \"ERROR\", \"formattedDescription\": \"Start Virtual Machine %@\", \"descriptionParameters\": [\"jumphost\"], \"formattedMessage\": \"Cannot start virtual machine 'jumphost'\", \"messageParameters\": [], \"objectUUID\": \"7f742bf2-128e-4f48-883c-0283df4286f3\", \"created\": 1731266925, \"modified\": 1731266937, \"completed\": 1731266937, \"sessionID\": \"a04a8728-932c-4b70-a39d-31b8fbbbe780\", \"nodeUUIDs\": [\"\"]}"}
In the UI I see afterwards a VM which has 0 cores assigned.