mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
Add option required=(True|False) to get_bin_path and update modules
Added required as optional argument to get_bin_path(). It defaults to false. Updated following modules to use required=True when calling get_bin_path(): apt_repository, easy_install, group, pip, supervisorctl, and user. Also removed _find_supervisorctl() from supervisorctl module and updated _is_running() to not need it.
This commit is contained in:
@@ -46,9 +46,7 @@ def main():
|
||||
|
||||
module = AnsibleModule(argument_spec=arg_spec)
|
||||
|
||||
add_apt_repository = module.get_bin_path(ADD_APT_REPO)
|
||||
if add_apt_repository is None:
|
||||
module.fail_json(msg='Unable to find executable %s' % ADD_APT_REPO)
|
||||
add_apt_repository = module.get_bin_path(ADD_APT_REPO, True)
|
||||
|
||||
repo = module.params['repo']
|
||||
state = module.params['state']
|
||||
|
||||
Reference in New Issue
Block a user