Skip to content

ValueError: not enough values to unpack (expected 2, got 1) #690

@MrDiba

Description

@MrDiba
ISSUE TYPE
  • Bug Report
SOFTWARE VERSIONS
Ansible:

ansible 2.10.8
python version = 3.9.2

NetBox:

v3.0.10

Collection:

netbox.netbox 3.4.0
pynetbox==6.1.3

SUMMARY

Trying to add a IP but get the error: ValueError: not enough values to unpack (expected 2, got 1)

STEPS TO REPRODUCE
---
- name: "Add IP"
  hosts: localhost
  gather_facts: false
  become: false
  tasks:
    - name: "Add IP address to Netbox"
      netbox.netbox.netbox_ip_address:
        netbox_url: "{{ netbox_url }}"
        netbox_token: "{{ netbox_token }}"
        data:
          address: "10.0.0.1"
          dns_name: "test04"
        state: present
EXPECTED RESULTS

That the IP has been added to Netbox.

ACTUAL RESULTS

Get an error that I do not understand.

Traceback (most recent call last):
  File "/home/ansible/.ansible/tmp/ansible-tmp-1641895061.821249-3878508-138074437267308/AnsiballZ_netbox_ip_address.py", line 102, in <module>
    _ansiballz_main()
  File "/home/ansible/.ansible/tmp/ansible-tmp-1641895061.821249-3878508-138074437267308/AnsiballZ_netbox_ip_address.py", line 94, in _ansiballz_main
    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File "/home/ansible/.ansible/tmp/ansible-tmp-1641895061.821249-3878508-138074437267308/AnsiballZ_netbox_ip_address.py", line 40, in invoke_module
    runpy.run_module(mod_name='ansible_collections.netbox.netbox.plugins.modules.netbox_ip_address', init_globals=None, run_name='__main__', alter_sys=True)
  File "/usr/lib/python3.9/runpy.py", line 210, in run_module
    return _run_module_code(code, init_globals, run_name, mod_spec)
  File "/usr/lib/python3.9/runpy.py", line 97, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "/usr/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/tmp/ansible_netbox.netbox.netbox_ip_address_payload_d9qos_xi/ansible_netbox.netbox.netbox_ip_address_payload.zip/ansible_collections/netbox/netbox/plugins/modules/netbox_ip_address.py", line 363, in <module>
  File "/tmp/ansible_netbox.netbox.netbox_ip_address_payload_d9qos_xi/ansible_netbox.netbox.netbox_ip_address_payload.zip/ansible_collections/netbox/netbox/plugins/modules/netbox_ip_address.py", line 358, in main
  File "/tmp/ansible_netbox.netbox.netbox_ip_address_payload_d9qos_xi/ansible_netbox.netbox.netbox_ip_address_payload.zip/ansible_collections/netbox/netbox/plugins/module_utils/netbox_ipam.py", line 35, in __init__
  File "/tmp/ansible_netbox.netbox.netbox_ip_address_payload_d9qos_xi/ansible_netbox.netbox.netbox_ip_address_payload.zip/ansible_collections/netbox/netbox/plugins/module_utils/netbox_utils.py", line 566, in __init__
  File "/tmp/ansible_netbox.netbox.netbox_ip_address_payload_d9qos_xi/ansible_netbox.netbox.netbox_ip_address_payload.zip/ansible_collections/netbox/netbox/plugins/module_utils/netbox_utils.py", line 687, in _convert_identical_keys
  File "/tmp/ansible_netbox.netbox.netbox_ip_address_payload_d9qos_xi/ansible_netbox.netbox.netbox_ip_address_payload.zip/ansible_collections/netbox/netbox/plugins/module_utils/netbox_utils.py", line 575, in _version_check_greater
ValueError: not enough values to unpack (expected 2, got 1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions