Added device_default #2

Merged
PeterSurda merged 1 commits from swapnil/ansible-modules-syncthing:master into master 2024-05-06 05:05:03 +00:00
Member
No description provided.
swapnil added 1 commit 2024-04-30 10:05:40 +00:00
swapnil added 1 commit 2024-05-01 17:24:57 +00:00
swapnil added 1 commit 2024-05-02 07:12:11 +00:00
swapnil force-pushed master from 46448fab1d to 8d6e24c460 2024-05-02 07:13:28 +00:00 Compare
swapnil added 1 commit 2024-05-02 07:49:24 +00:00
swapnil added 1 commit 2024-05-02 07:53:45 +00:00
swapnil added 1 commit 2024-05-02 07:58:12 +00:00
swapnil added 1 commit 2024-05-02 08:00:24 +00:00
swapnil added 1 commit 2024-05-02 08:10:19 +00:00
swapnil force-pushed master from 78def8612f to 71f3168dfd 2024-05-02 08:21:32 +00:00 Compare
PeterSurda requested changes 2024-05-03 03:56:44 +00:00
Dismissed
@ -0,0 +182,4 @@
current_config = module.get_call()
# Check for changes
changes = {key: module.params[key] for key in module.params if module.params.get(key) != current_config.get(key)}
Owner

does this work correctly on lists? e.g. allowedNetworks, igoredFolders?

does this work correctly on lists? e.g. `allowedNetworks`, `igoredFolders`?
@ -0,0 +184,4 @@
# Check for changes
changes = {key: module.params[key] for key in module.params if module.params.get(key) != current_config.get(key)}
if len(changes.keys()) > 0:
Owner

how about

if module.check_mode or changes.keys() == 0:
   module.result['device_default'] = current_config
   module_exit_json()

module.patch_call(data=module.params)
module.result['device_default'] = module.get_call()
module.result['changed'] = True
module.result['changes'] = changes
how about ``` if module.check_mode or changes.keys() == 0: module.result['device_default'] = current_config module_exit_json() module.patch_call(data=module.params) module.result['device_default'] = module.get_call() module.result['changed'] = True module.result['changes'] = changes ```
Owner

Also I would rather use device_defaults, not device_default.

Also I would rather use `device_defaults`, not `device_default`.
swapnil added 1 commit 2024-05-03 06:33:00 +00:00
swapnil added 1 commit 2024-05-03 09:35:21 +00:00
swapnil added 1 commit 2024-05-03 10:21:47 +00:00
swapnil added 1 commit 2024-05-03 10:26:48 +00:00
swapnil force-pushed master from a7909a00bf to 59a8f35db6 2024-05-03 10:39:00 +00:00 Compare
swapnil added 1 commit 2024-05-03 14:17:38 +00:00
swapnil force-pushed master from 46ba0e7057 to 31c955c5b9 2024-05-06 04:51:02 +00:00 Compare
PeterSurda approved these changes 2024-05-06 05:04:50 +00:00
PeterSurda merged commit 31c955c5b9 into master 2024-05-06 05:05:03 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Sysdeploy/ansible-modules-syncthing#2
No description provided.