You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ansible 2.9.19
python version = 3.8.5 (default, Jan 27 2021, 15:41:15) [GCC 9.3.0]
Netbox:
2.11.9
Collection:
3.1.1
SUMMARY
Every time I execute netbox_virtual_machine (with "state: present") on a VM already existing in Netbox, the item is alwasy marked as changed
Checking the diff, I see that the only difference is:
--- before
+++ after
@@ -1,3 +1,3 @@
{
- "vcpus": "2.00"
+ "vcpus": 2
}
Indeed I notice that vCPU count in Netbox is now represented as a float number, also on the web UI.
Anyway, having a falsey "changed" status is annoying, since real changes are not evident.
STEPS TO REPRODUCE
- name: "Test Netbox vcpus issue"connection: localhosts: localhostgather_facts: Falsetasks:
- name: Create a VM with 2 vCPUnetbox_virtual_machine:
netbox_url: http://netbox.localnetbox_token: thisIsMyTokendata:
name: Test Virtual Machinecluster: test clustervcpus: 2state: present
The first time, the VM is created.
If you run the same playbook once again (ansible-playbook -D test.yml), the VM is shown as changed (the only difference is the vcpus format).
EXPECTED RESULTS
The first time, the VM is created, thus the task result is changed.
The second time the task result should be ok.
ACTUAL RESULTS
The second time you run the playbook, the task result always appear as changed.
The text was updated successfully, but these errors were encountered:
I am unable to replicate the changed issue, but it's clear that the collection does not allow creation of the virtual machine with vcpu as a float for the moment. We should change the vcpu argument from int to float.
ISSUE TYPE
SOFTWARE VERSIONS
Ansible:
ansible 2.9.19
python version = 3.8.5 (default, Jan 27 2021, 15:41:15) [GCC 9.3.0]
Netbox:
2.11.9
Collection:
3.1.1
SUMMARY
Every time I execute
netbox_virtual_machine
(with "state: present") on a VM already existing in Netbox, the item is alwasy marked as changedChecking the
diff
, I see that the only difference is:Indeed I notice that vCPU count in Netbox is now represented as a float number, also on the web UI.
Anyway, having a falsey "changed" status is annoying, since real changes are not evident.
STEPS TO REPRODUCE
The first time, the VM is created.
If you run the same playbook once again (
ansible-playbook -D test.yml
), the VM is shown as changed (the only difference is thevcpus
format).EXPECTED RESULTS
The first time, the VM is created, thus the task result is changed.
The second time the task result should be ok.
ACTUAL RESULTS
The second time you run the playbook, the task result always appear as changed.
The text was updated successfully, but these errors were encountered: