'NoneType' object has no attribute 'data_center'

hi, i'm using VM creation through ansible - ovirt 4.5 - name: Creates a new Virtual Machine from template ovirt.ovirt.ovirt_vm: auth: "{{ ovirt_auth }}" state: present cpu_cores: 2 memory: 4GiB name: "{{NAME}}" template: "{{ VM_TEMPLATE }}" comment: "{{comment}}" description: "{{description}}" cluster: "{{CLUSTER}}" type: server high_availability: yes operating_system: rhel_9x64 graphical_console: protocol: - vnc cloud_init_persist: yes nics: - name: enp1s0 profile_name: "{{VLAN1}}" - name: enp2s0 profile_name: "{{VLAN2}}" cloud_init: dns_servers: '1.1.1.1' host_name: "{{NAME}}" user_name: root root_password: "{{ROOT_PASSWORD}}" authorized_ssh_keys: "ssh-ed25519 secret" cloud_init_nics: - nic_name: enp1s0 nic_boot_protocol: static nic_ip_address: "{{PRIVATE_IP}}" nic_netmask: 255.255.255.0 nic_gateway: x.x.x.x - nic_name: enp2s0 nic_boot_protocol: static nic_ip_address: "{{PUBLIC_IP}}" nic_netmask: "{{PUBLIC_NETMASK}}" it works before . double checked input no upgrades/changes any ideas where can be problem? any tips howto debug Marek The full traceback is: Traceback (most recent call last): File "/tmp/ansible_ovirt.ovirt.ovirt_vm_payload_thzzyp5t/ansible_ovirt.ovirt.ovirt_vm_payload.zip/ansible_collections/ovirt/ovirt/plugins/modules/ovirt_vm.py", line 2694, in main File "/tmp/ansible_ovirt.ovirt.ovirt_vm_payload_thzzyp5t/ansible_ovirt.ovirt.ovirt_vm_payload.zip/ansible_collections/ovirt/ovirt/plugins/module_utils/ovirt.py", line 673, in create self.build_entity(), File "/tmp/ansible_ovirt.ovirt.ovirt_vm_payload_thzzyp5t/ansible_ovirt.ovirt.ovirt_vm_payload.zip/ansible_collections/ovirt/ovirt/plugins/modules/ovirt_vm.py", line 1525, in build_entity File "/tmp/ansible_ovirt.ovirt.ovirt_vm_payload_thzzyp5t/ansible_ovirt.ovirt.ovirt_vm_payload.zip/ansible_collections/ovirt/ovirt/plugins/modules/ovirt_vm.py", line 1418, in __get_template_with_version AttributeError: 'NoneType' object has no attribute 'data_center'

it was bad ovirt URL (dev vs production cluster) :( Dne 2023-11-01 v 9:50 marek napsal(a):
hi,
i'm using VM creation through ansible - ovirt 4.5
- name: Creates a new Virtual Machine from template ovirt.ovirt.ovirt_vm: auth: "{{ ovirt_auth }}" state: present cpu_cores: 2 memory: 4GiB name: "{{NAME}}" template: "{{ VM_TEMPLATE }}" comment: "{{comment}}" description: "{{description}}"
cluster: "{{CLUSTER}}" type: server high_availability: yes operating_system: rhel_9x64 graphical_console: protocol: - vnc cloud_init_persist: yes nics: - name: enp1s0 profile_name: "{{VLAN1}}" - name: enp2s0 profile_name: "{{VLAN2}}"
cloud_init: dns_servers: '1.1.1.1' host_name: "{{NAME}}" user_name: root root_password: "{{ROOT_PASSWORD}}" authorized_ssh_keys: "ssh-ed25519 secret" cloud_init_nics: - nic_name: enp1s0 nic_boot_protocol: static nic_ip_address: "{{PRIVATE_IP}}" nic_netmask: 255.255.255.0 nic_gateway: x.x.x.x - nic_name: enp2s0 nic_boot_protocol: static nic_ip_address: "{{PUBLIC_IP}}" nic_netmask: "{{PUBLIC_NETMASK}}"
it works before . double checked input
no upgrades/changes
any ideas where can be problem? any tips howto debug
Marek
The full traceback is: Traceback (most recent call last): File "/tmp/ansible_ovirt.ovirt.ovirt_vm_payload_thzzyp5t/ansible_ovirt.ovirt.ovirt_vm_payload.zip/ansible_collections/ovirt/ovirt/plugins/modules/ovirt_vm.py", line 2694, in main File "/tmp/ansible_ovirt.ovirt.ovirt_vm_payload_thzzyp5t/ansible_ovirt.ovirt.ovirt_vm_payload.zip/ansible_collections/ovirt/ovirt/plugins/module_utils/ovirt.py", line 673, in create self.build_entity(), File "/tmp/ansible_ovirt.ovirt.ovirt_vm_payload_thzzyp5t/ansible_ovirt.ovirt.ovirt_vm_payload.zip/ansible_collections/ovirt/ovirt/plugins/modules/ovirt_vm.py", line 1525, in build_entity File "/tmp/ansible_ovirt.ovirt.ovirt_vm_payload_thzzyp5t/ansible_ovirt.ovirt.ovirt_vm_payload.zip/ansible_collections/ovirt/ovirt/plugins/modules/ovirt_vm.py", line 1418, in __get_template_with_version AttributeError: 'NoneType' object has no attribute 'data_center'
participants (1)
-
marek