Closed patchback[bot] closed 1 month ago
This is a backport of PR #8897 as merged into main (d4fb6bf8a65afabe3576b49af906585425571ac3).
Add conn_reload option to perform nmcli connection reload if set to true Add up and down states to perform nmcli up/nmcli down commands
conn_reload
nmcli connection reload
up
down
nmcli up
nmcli down
Fixes #3752 Fixes #8704 Fixes #7152
nmcli
I am not completely sure how to make applying changes correctly as there is no distinct difference between 4 different variants in a related issue (see https://github.com/ansible-collections/community.general/issues/3752#issuecomment-1714459183) so if you have some ideas I would be glad to get comments from you :)
# Changing with reloading afterwards - name: Change the property of a setting e.g. MTU and reload connection community.general.nmcli: conn_name: my-eth1 mtu: 1500 type: ethernet state: present conn_reload: true # Simply disabling connection - name: Disable connection community.general.nmcli: conn_name: my-eth1 state: down # Reload and then enable connection - name: Reload and enable connection community.general.nmcli: conn_name: my-eth1 state: up reload: true
cc @alcamie101 click here for bot help
This is a backport of PR #8897 as merged into main (d4fb6bf8a65afabe3576b49af906585425571ac3).
SUMMARY
Add
conn_reload
option to performnmcli connection reload
if set to true Addup
anddown
states to performnmcli up
/nmcli down
commandsFixes #3752 Fixes #8704 Fixes #7152
ISSUE TYPE
COMPONENT NAME
nmcli
ADDITIONAL INFORMATION
I am not completely sure how to make applying changes correctly as there is no distinct difference between 4 different variants in a related issue (see https://github.com/ansible-collections/community.general/issues/3752#issuecomment-1714459183) so if you have some ideas I would be glad to get comments from you :)