diff --git a/changelogs/fragments/10688-pids.yml b/changelogs/fragments/10688-pids.yml new file mode 100644 index 0000000000..1ed97a6fed --- /dev/null +++ b/changelogs/fragments/10688-pids.yml @@ -0,0 +1,2 @@ +bugfixes: + - "pids - prevent error when an empty string is provided for ``name`` (https://github.com/ansible-collections/community.general/issues/10672, https://github.com/ansible-collections/community.general/pull/10688)." diff --git a/plugins/modules/pids.py b/plugins/modules/pids.py index 2db5dbfa23..fcabec313f 100644 --- a/plugins/modules/pids.py +++ b/plugins/modules/pids.py @@ -195,7 +195,7 @@ class Pids(object): self._pids = [] def execute(self): - if self._name: + if self._name is not None: self._pids = self._ps.get_pids_by_name(self._name) else: try: