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: add ipv4.routing-rules, ipv4.may-fail options and disabled to method6 #2730

Closed
1 task done
omula opened this issue Jun 6, 2021 · 4 comments · Fixed by #2732
Closed
1 task done

nmcli: add ipv4.routing-rules, ipv4.may-fail options and disabled to method6 #2730

omula opened this issue Jun 6, 2021 · 4 comments · Fixed by #2732
Labels
feature This issue/PR relates to a feature request integration tests/integration module_utils module_utils module module net_tools plugins plugin (any type) system tests tests

Comments

@omula
Copy link
Contributor

omula commented Jun 6, 2021

Summary

I am trying to configure our network setup which is possible with nmcli command line but there are some missing options in the ansible collections which prevents us from using it. Adding this options will extend the possible configuration that the collection can do and get closer to nmcli command capabilities.

Issue Type

Feature Idea

Component Name

nmcli

Additional Information

This type of configuration is for example used for Lustre and Multi-Rail environments.
https://wiki.lustre.org/LNet_Router_Config_Guide#ARP_flux_issue_for_MR_node

nmcli c add type infiniband con-name ib0 \
  ifname ib0 infiniband.mtu 2044 ipv4.method manual \
  ipv4.may-fail false ipv4.addresses 10.0.0.3/16 \
  ipv4.route-metric 0 ipv4.routes "10.0.0.0/16 src=10.0.0.3 table=200" \
  ipv4.routing-rules "priority 0 from 10.0.0.3 lookup 200" \
  ipv6.method disabled connection.zone internal
vars:
  infiniband_interfaces:
    - device: ib0
      type: infiniband
      ip4: 10.0.0.3/16
      mtu: 2044
      route_table: 200
      may_fail4: false

tasks:
  - name: "Configure IB MR interface"
    community.general.nmcli:
       conn_name: "{{ item.device }}"
       ifname: "{{ item.device }}"
       type: "{{ item.type }}"
       ip4: "{{ item.ip4 }}"
       mtu: "{{ item.mtu }}"
       method4: manual
       method6: disabled
       routes4: "{{ item.ip4 | ipaddr('network') }}/{{ item.ip4 | ipaddr('prefix') }} src={{ item.ip4 | ipaddr('address') }} table={{ item.route_table }}"
       route_metric4: 0
       routing_rules4: "priority 0 from {{ item.ip4 | ipaddr('address') }} lookup {{ item.route_table }}"
       may_fail4: false
       state: present

Code of Conduct

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

This comment has been minimized.

@ansibullbot ansibullbot added affects_2.10 feature This issue/PR relates to a feature request integration tests/integration module module module_utils module_utils needs_triage net_tools plugins plugin (any type) system tests tests labels Jun 6, 2021
@felixfontein felixfontein changed the title add ipv4.routing-rules, ipv4.may-fail options and disabled to method6 nmcli: add ipv4.routing-rules, ipv4.may-fail options and disabled to method6 Jun 6, 2021
@felixfontein
Copy link
Collaborator

!component =plugins/modules/net_tools/nmcli.py

@ansibullbot
Copy link
Collaborator

Files identified in the description:

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

click here for bot help

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 integration tests/integration module_utils module_utils module module net_tools plugins plugin (any type) system tests tests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants