diff --git a/changelogs/fragments/deps.yml b/changelogs/fragments/deps.yml new file mode 100644 index 0000000000..2ad1b7e2c3 --- /dev/null +++ b/changelogs/fragments/deps.yml @@ -0,0 +1,2 @@ +bugfixes: + - "deps module utils - do not fail when dependency cannot be found (https://github.com/ansible-collections/community.general/pull/6479)." diff --git a/plugins/module_utils/deps.py b/plugins/module_utils/deps.py index f6f4082a36..a2413d1952 100644 --- 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