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

nmcli support for vrf #8014

Open
1 task done
cbutera-sqsp opened this issue Feb 23, 2024 · 2 comments
Open
1 task done

nmcli support for vrf #8014

cbutera-sqsp opened this issue Feb 23, 2024 · 2 comments
Labels
feature This issue/PR relates to a feature request module module plugins plugin (any type)

Comments

@cbutera-sqsp
Copy link

Summary

The nmcli module does not support vrf creation. Two commands are required to create a vrf and then place an interface in one.
The command to create the vrf fails due to table and type vrf not being supported.
CLI command example ansible task example and errors below

nmcli connection add con-name mgmt type vrf ifname mgmt table 10 ipv4.method disabled ipv6.method disabled

- name: create mgmt vrf
  community.general.nmcli:
    type: vrf
    ifname: mgmt
    table: 10
    state: present
    conn_name: mgmt

Unsupported parameters for (community.general.nmcli) module: table

FAILED! => {"changed": false, "msg": "value of type must be one of: bond, bond-slave, bridge, bridge-slave, dummy, ethernet, generic, gre, infiniband, ipip, sit, team, team-slave, vlan, vxlan, wifi, gsm, macvlan, wireguard, vpn, loopback, got: vrf"}

The second command to configure the interface and place it in the vrf fails due to the slave_type vrf not being supported.
CLI command example ansible task example and errors below

nmcli connection add con-name eth0 ifname eth0 type ethernet ip4 192.168.1.2/24 gw4 192.168.1.1

- name: Add mgmt_iface connection
  become: true
  community.general.nmcli:
    type: ethernet
    conn_name: "{{ mgmt_iface }}"
    ifname: "{{ mgmt_iface }}"
    master: mgmt
    slave_type: vrf
    state: present
    ip4: "{{ mgmt_ipaddr1 }}/24"
    gw4: "{{ mgmt_ipaddr1 | ipsubnet(24) | ipaddr('1') | ipaddr('address') }}"

FAILED! => {"changed": false, "msg": "value of slave_type must be one of: bond, bridge, team, got: vrf"}

Issue Type

Feature Idea

Component Name

nmcli

Additional Information

Code of Conduct

  • I agree to follow the Ansible Code of Conduct
@ansibullbot
Copy link
Collaborator

Files identified in the description:

If these files are incorrect, please update the component name section of the description or use the !component bot command.

click here for bot help

@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added feature This issue/PR relates to a feature request module module plugins plugin (any type) labels Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This issue/PR relates to a feature request module module plugins plugin (any type)
Projects
None yet
Development

No branches or pull requests

2 participants