Hi,
Anyone used nmcli ansible module to configure Ethernet Interface in a Virtual Machine. Simple task to enable Ethernet interface is not getting interface to Active. We manually need to UP the interface to update the configurations like IPv4 address, GW etc.
Tried with “autoconnect”: true and above scenario noticed.
Also trying to see how nmcli ansible modules can be used policy routing to Rocky VM’s.
Eg: like use of routing_rules4
We could able to update rules for single entries as,
routing_rules4: “priority 0 from {{ item.ip4 | ipaddr(‘address’) }} lookup {{ item.route_table }}”
But when we tried add one one entry it’s not working.
Anyone tried adding multiple rules similar to this
As said, I haven’t used ansible to do network. Not much policy routing either.
Besides, I use ansible 2.9. routing_rules4 is not in it.
There is package to enable legacy rule format:
Name : NetworkManager-dispatcher-routing-rules
Description : This adds a NetworkManager dispatcher file to support networking
: configurations using "/etc/sysconfig/network-scripts/rule-NAME" files
: (eg, to do policy-based routing).
That obviously works around the lacking “native support” of nmcli.
Yes. I think for policy based routing as you mentioned using legacy rules could be good at this point of time. For common configurations nmcli works fine.