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
Create a task file with reference to the netbox.netbox.netbox_virtual_machine module:
- name: "Make sure VM with name '{{ item }}' exists."netbox.netbox.netbox_virtual_machine:
netbox_url: "{{ netbox_url }}"netbox_token: "{{ netbox_token }}"state: presentdata:
name: "{{ item }}"site: "{{ netbox_site }}"cluster: "{{ netbox_cluster }}"vcpus: "{{ netbox_vcpus }}"# This variable is a proper float type, which we have verified.memory: "{{ netbox_memory }}"# This variable is a proper int type, which we have verified.disk: "{{ netbox_disk }}"# This variable is a proper int type, which we have verified.register: vm_change
Run ansible-lint against the file:
ansible-lintmy_role/tasks/create_vm.yml
This warning is produced, indicating that an exception happened in parsing, and it's not going through proper lint checks.
WARNING Ignored exception from ArgsRule.matchtasks while processing my_role/tasks/create_vm.yml (tasks): 'vcpus'
Expected Behavior
One would expect ansible-lint to run correctly on a valid task file. The task in question does execute in our playbooks just fine. However, this warning means that it's not actually running any lint checks on the file.
The same warning happens on the memory and disk fields as well, possibly others? Oddly enough, the name, site, and cluster fields don't produce any warnings.
Commenting out the offending fields does allow ansible-lint to run without these warnings, but obviously would not have the correct results in our playbooks.
The text was updated successfully, but these errors were encountered:
Ansible NetBox Collection version
v3.20.0
Ansible version
NetBox version
v4.0.5
Python version
3.11
Steps to Reproduce
Expected Behavior
One would expect ansible-lint to run correctly on a valid task file. The task in question does execute in our playbooks just fine. However, this warning means that it's not actually running any lint checks on the file.
Observed Behavior
The same warning happens on the
memory
anddisk
fields as well, possibly others? Oddly enough, thename
,site
, andcluster
fields don't produce any warnings.Commenting out the offending fields does allow ansible-lint to run without these warnings, but obviously would not have the correct results in our playbooks.
The text was updated successfully, but these errors were encountered: