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
Idempotence in the nmcli module with the 'route_metric4' parameter #4998
Comments
Files identified in the description: If these files are incorrect, please update the |
ansibullbot
added
bug
This issue/PR relates to a bug
module
module
net_tools
plugins
plugin (any type)
labels
Jul 25, 2022
Files identified in the description: If these files are incorrect, please update the |
1 task
1 task
1 task
1 task
1 task
ghost
mentioned this issue
Nov 7, 2022
1 task
1 task
1 task
1 task
1 task
1 task
This was referenced Nov 7, 2022
Closed
1 task
This was referenced Nov 20, 2022
Closed
Closed
Closed
Closed
Closed
Closed
This was referenced Dec 1, 2022
1 task
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
I figured out some Idempotence in the nmcli module with the 'route_metric4' parameter.
This issue is actual for both Ansible versions, 5.7 and 6.0.
By default, the route metric value is '-1'. You can verify this if you run the 'nmcli conn sh eth0' command, for example.
ipv4.route-metric: -1
ipv4.route-table: 0 (unspec)
If we have this value in our host vars and no one other network parameter changes, the playbook with nmcli task nothing change on the target system.
But only if we change any other network parameter 'route4', 'ipv6.method', doesn't matter, the 'route_metric4' parameter also will change from "-1" to -1.
Of course, nothing has been changed on the target system finally, and 'nmcli conn sh' is showing the '-1' value as was before the playbook run.
It looks no so good.
Issue Type
Bug Report
Component Name
nmcli module
Ansible Version
Community.general Version
Configuration
OS / Environment
Ubuntu 20.04
Steps to Reproduce
The route_metric4 by default have value '-1'
{
"msg": [
{
"device": "eth0",
"gw": null,
"ip4": "xx.xx.xx.xx/24",
"metric": -1,
"routes": []
}
]
}
Expected Results
I expected the route metric didn't changed if in host_vars and in real system it value were similar, '-1'
But when any other parameter will change for this interface the 'route_metric4' will change too.
Actual Results
Code of Conduct
The text was updated successfully, but these errors were encountered: