Skip to content

Conversation

@patchback
Copy link

@patchback patchback bot commented Jan 20, 2026

This is a backport of PR #11114 as merged into main (a8378a4).

SUMMARY

This PR will update the module to be idempotent by:

  • Checking the current connection status before executing commands.
  • Avoiding unnecessary commands when the desired state has already been achieved.
  • Returning changed=False when no action is required.
  • Properly managing check mode for up and down states.
  • The module will no longer generate changes when an interface is already in the desired state, so that respect Ansible's idempotence principle.

Ref : #9897

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME
  • nmcli

* nmcli idempotency connection check

* Changelog fragment and ruff reformat

* Fix : change error handling

* Remove odd conditions

* Refactor nmcli: fix error handling and remove redundant logic

* Fix code format

* Fix error message to handle

(cherry picked from commit a8378a4)
@ansibullbot
Copy link
Collaborator

@ansibullbot ansibullbot added backport feature This issue/PR relates to a feature request module module new_contributor Help guide this first time contributor plugins plugin (any type) labels Jan 20, 2026
@felixfontein felixfontein merged commit 68bd8ba into stable-12 Jan 20, 2026
125 checks passed
@felixfontein felixfontein deleted the patchback/backports/stable-12/a8378a4eb0d31cd0dd197e8266451e30c6a68ea7/pr-11114 branch January 20, 2026 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport feature This issue/PR relates to a feature request module module new_contributor Help guide this first time contributor plugins plugin (any type)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants