ansible.snmp icon indicating copy to clipboard operation
ansible.snmp copied to clipboard

Fix windows registry editing task

Open m3gat0nn4ge opened this issue 5 years ago • 1 comments

The windows registry edits were failing:

" "msg": "failed to create registry key at HKLM:\\SYSTEM\\CurrentControlSet\\Services\\SNMP\\Parameters\\ValidCommunities: Exception calling "CreateSubKey" with "1" argument(s): "The specified path is invalid.\r\n"", " Removing the excess backslashes resolves the issue:

{ "ansible_loop_var": "item", "_ansible_no_log": false, "data_type_changed": false, "data_changed": true, "item": { "path": "PermittedManagers", "type": "string", "name": "1", "data": "0.0.0.0" }, "changed": true, "_ansible_item_label": { "path": "PermittedManagers", "type": "string", "name": "1", "data": "0.0.0.0" } }

m3gat0nn4ge avatar Oct 24 '19 12:10 m3gat0nn4ge

I've tested this change and it works fine on a Windows server 2019

duviful avatar Apr 23 '21 13:04 duviful