-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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 - Task always changed : Connections do exist so we are modifying them #3216
Comments
Files identified in the description: If these files are inaccurate, please update the |
Please run the playbook with I guess there're some implicit connection parameter values that are not considered in the code. |
TASK [southbridge.core.bridge : Network bridge configured] ********************************
--- before
+++ after
@@ -1,8 +1,8 @@
-bridge.ageing-time: '300'
-bridge.forward-delay: '15'
-bridge.hello-time: '2'
-bridge.max-age: '20'
-bridge.priority: '32768'
+bridge.ageing-time: 300
+bridge.forward-delay: 15
+bridge.hello-time: 2
+bridge.max-age: 20
+bridge.priority: 128
bridge.stp: 'no'
connection.autoconnect: 'yes'
connection.interface-name: br0 - name: Network bridge configured
community.general.nmcli:
conn_name: br0
ifname: br0
type: bridge
method4: auto
method6: disabled
stp: false
state: present
- name: Bridge ports configured
community.general.nmcli:
conn_name: enp1s0
ifname: enp1s0
type: bridge-slave
master: br0
hairpin: false
state: present |
Files identified in the description: If these files are incorrect, please update the |
There are several bugs on this, but didn't see comment reporting the cause. Priority is hardset on some systems (confirmed several versions of Rocky8) to 32768 and cannot be changed. Setting the priority to that in the playbook resolved the change issue. |
Summary
When utilizing
community.general.nmcli
to create a bridge interface I noticed that it was always returning as "changed" even though nothing was happening before it to modify. I proceeded to slim down the playbook to only have that step and I was able to reproduce the same behavior.Some idempotency is broken in the module, possibly surrounding a
bridge
interface.Similar Issues
Issue Type
Bug Report
Component Name
nmcli
community.general : 3.5.0
Ansible Version
Configuration
OS / Environment
Controller Node : MacOSX
Target Node : RHEL 8.3
Steps to Reproduce
Expected Results
I expect after running this more than once that this step returns "OK" and not "changed"
Actual Results
Result always returns as "changed"
Code of Conduct
The text was updated successfully, but these errors were encountered: