Skip to content

Commit

Permalink
ejabberd_user: better error when command not installed (#7028)
Browse files Browse the repository at this point in the history
* ejabberd_user: better error when command not installed

* add changelog frag
  • Loading branch information
russoz authored Jul 29, 2023
1 parent b46d5d8 commit 3a7044e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelogs/fragments/6949-ejabberdctl-error.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bugfixes:
- ejabberd_user - provide meaningful error message when the ``ejabberdctl`` command is not found (https://github.com/ansible-collections/community.general/pull/7028, https://github.com/ansible-collections/community.general/issues/6949).
2 changes: 1 addition & 1 deletion plugins/modules/ejabberd_user.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def run_command(self, cmd, options):
""" This method will run the any command specified and return the
returns using the Ansible common module
"""
cmd = [self.module.get_bin_path('ejabberdctl'), cmd] + options
cmd = [self.module.get_bin_path('ejabberdctl', required=True), cmd] + options
self.log('command: %s' % " ".join(cmd))
return self.module.run_command(cmd)

Expand Down

0 comments on commit 3a7044e

Please sign in to comment.