Repository: ansible-collections/community.general

Issue:
udm_dns_record not working since 6.6.0
### Summary

udm_dns_record not working since community.general=6.6.0
After downgrading to 6.5.0 everything works as expected

### Issue Type

Bug Report

### Component Name

udm_dns_record

### Ansible Version

2.4.15
python 3.10

### Community.general Version

6.6.0 has the bug

### Steps to Reproduce

just try to use udm_dns_record module, esp

```
   - name: set dns record
      delegate_to: dns-server
      community.general.udm_dns_record:
        name: test
        zone: test.de
        type: host_record
        data:
          a:
            - "127.0.0.1"
```

### Expected Results

dns record set

### Actual Results

big error message

```
TASK [set dns record] ***********************************************************************************************************************************************************************
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: KeyError: 'nivention'
fatal: [dns-server]: FAILED! => {"changed": false, "module_stderr": "Shared connection to twtdc.twt.intern closed.\r\n", "module_stdout": "Traceback (most recent call last):\r\n  File \"/root/.ansible/tmp/ansible-tmp-1682933269.2887108-1032513-22628385536011/AnsiballZ_udm_dns_record.py\", line 107, in <module>\r\n    _ansiballz_main()\r\n  File \"/root/.ansible/tmp/ansible-tmp-1682933269.2887108-1032513-22628385536011/AnsiballZ_udm_dns_record.py\", line 99, in _ansiballz_main\r\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\r\n  File \"/root/.ansible/tmp/ansible-tmp-1682933269.2887108-1032513-22628385536011/AnsiballZ_udm_dns_record.py\", line 48, in invoke_module\r\n    run_name='__main__', alter_sys=True)\r\n  File \"/usr/lib/python3.7/runpy.py\", line 205, in run_module\r\n    return _run_module_code(code, init_globals, run_name, mod_spec)\r\n  File \"/usr/lib/python3.7/runpy.py\", line 96, in _run_module_code\r\n    mod_name, mod_spec, pkg_name, script_name)\r\n  File \"/usr/lib/python3.7/runpy.py\", line 85, in _run_code\r\n    exec(code, run_globals)\r\n  File \"/tmp/ansible_community.general.udm_dns_record_payload_ba_yaepj/ansible_community.general.udm_dns_record_payload.zip/ansible_collections/community/general/plugins/modules/udm_dns_record.py\", line 233, in <module>\r\n  File \"/tmp/ansible_community.general.udm_dns_record_payload_ba_yaepj/ansible_community.general.udm_dns_record_payload.zip/ansible_collections/community/general/plugins/modules/udm_dns_record.py\", line 138, in main\r\n  File \"/tmp/ansible_community.general.udm_dns_record_payload_ba_yaepj/ansible_community.general.udm_dns_record_payload.zip/ansible_collections/community/general/plugins/module_utils/deps.py\", line 93, in validate\r\n  File \"/tmp/ansible_community.general.udm_dns_record_payload_ba_yaepj/ansible_community.general.udm_dns_record_payload.zip/ansible_collections/community/general/plugins/module_utils/deps.py\", line 86, in _select_names\r\nKeyError: 'nivention'\r\n", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
```

maybe this commit? https://github.com/ansible-collections/community.general/commit/3e338a1cca7aa7291f042fb404a324138c57d096



### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct


Discussion:
Files identified in the description:
* [`plugins/modules/udm_dns_record.py`](https://github.com/ansible-collections/community.general/blob/main/plugins/modules/udm_dns_record.py)

If these files are incorrect, please update the `component name` section of the description or use the `!component` bot command.

[click here for bot help](https://github.com/ansible/ansibullbot/blob/devel/ISSUE_HELP.md)
<!--- boilerplate: components_banner --->
cc @keachi
[click here for bot help](https://github.com/ansible/ansibullbot/blob/devel/ISSUE_HELP.md)
<!--- boilerplate: notify --->
Error in readable form:
```
Traceback (most recent call last):
  File "/root/.ansible/tmp/ansible-tmp-1682933269.2887108-1032513-22628385536011/AnsiballZ_udm_dns_record.py", line 107, in <module>
    _ansiballz_main()
  File "/root/.ansible/tmp/ansible-tmp-1682933269.2887108-1032513-22628385536011/AnsiballZ_udm_dns_record.py", line 99, in _ansiballz_main
    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)
  File "/root/.ansible/tmp/ansible-tmp-1682933269.2887108-1032513-22628385536011/AnsiballZ_udm_dns_record.py", line 48, in invoke_module
    run_name='__main__', alter_sys=True)
  File "/usr/lib/python3.7/runpy.py", line 205, in run_module
    return _run_module_code(code, init_globals, run_name, mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 96, in _run_module_code
    mod_name, mod_spec, pkg_name, script_name)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/tmp/ansible_community.general.udm_dns_record_payload_ba_yaepj/ansible_community.general.udm_dns_record_payload.zip/ansible_collections/community/general/plugins/modules/udm_dns_record.py", line 233, in <module>
  File "/tmp/ansible_community.general.udm_dns_record_payload_ba_yaepj/ansible_community.general.udm_dns_record_payload.zip/ansible_collections/community/general/plugins/modules/udm_dns_record.py", line 138, in main
  File "/tmp/ansible_community.general.udm_dns_record_payload_ba_yaepj/ansible_community.general.udm_dns_record_payload.zip/ansible_collections/community/general/plugins/module_utils/deps.py", line 93, in validate
  File "/tmp/ansible_community.general.udm_dns_record_payload_ba_yaepj/ansible_community.general.udm_dns_record_payload.zip/ansible_collections/community/general/plugins/module_utils/deps.py", line 86, in _select_names
KeyError: 'nivention'
```

CC @russoz

Resolving patch:
diff --git a/plugins/module_utils/deps.py b/plugins/module_utils/deps.py
--- a/plugins/module_utils/deps.py
+++ b/plugins/module_utils/deps.py
@@ -80,7 +80,7 @@ def _select_names(spec):
             for d in spec_split:
                 dep_names.remove(d)
         else:
-            spec_split = spec[1:].split(":")
+            spec_split = spec.split(":")
             dep_names = []
             for d in spec_split:
                 _deps[d]  # ensure it exists


Test patch: