Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: netbox_vm_interface module doesn't accept mac_address anymore #1376

Open
rletocart opened this issue Jan 31, 2025 · 1 comment
Open
Labels
bug Something isn't working

Comments

@rletocart
Copy link

Ansible NetBox Collection version

v3.19.1

Ansible version

ansible [core 2.17.1]
  config file = /Users/raph/dev/ansible/netbox/ansible.cfg
  configured module search path = ['/Users/raph/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /Users/raph/dev/ansible/netbox/lib/python3.12/site-packages/ansible
  ansible collection location = /Users/raph/.ansible/collections:/usr/share/ansible/collections
  executable location = /Users/raph/dev/ansible/netbox/bin/ansible
  python version = 3.12.8 (main, Dec  3 2024, 18:42:41) [Clang 16.0.0 (clang-1600.0.26.4)] (/Users/raph/dev/ansible/netbox/bin/python3)
  jinja version = 3.1.4
  libyaml = True

NetBox version

v4.2.2

Python version

3.11

Steps to Reproduce

- name: "ADD VM INTERFACES TO NETBOX"
  netbox.netbox.netbox_vm_interface:
    netbox_url: "{{ NETBOX_ENDPOINT }}"
    netbox_token: "{{ NETBOX_TOKEN }}"
    data:
      virtual_machine: "{{ inventory_hostname }}"
      name: "{{ item  }}"
      enabled: "true"
      mac_address: "{{ ansible_facts[item].macaddress | ansible.utils.hwaddr | upper }}"
    state: present
  loop: "{{ ansible_interfaces | list }}"

Expected Behavior

Virtual machine net interfaces are created in netbox WITH a MAC address. This was working before v4.2.1

Observed Behavior

MAC address seems simply ignored. I didn't get any error in ansible.

@rletocart rletocart added the bug Something isn't working label Jan 31, 2025
@raphis
Copy link

raphis commented Jan 31, 2025

Can confirm this behavior on our side as well on v4.2.2.

I currently think that this might be fixed with this commit in the ansible-collection repo: fa4c44b

However there's currently no new release so manual patching might be required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants