From 4a19482413bf2542b01d5d5fe74019dee3dbf4b9 Mon Sep 17 00:00:00 2001 From: James Sumners Date: Mon, 30 Oct 2017 09:59:41 -0400 Subject: [PATCH] Add check for sv binary (#32250) * Add check for sv binary This commit adds a check for the sv binary. If the binary is not present then the module will fail. Resolves issue #32248 * Change sv check to suggestion by @bcoca --- lib/ansible/modules/system/runit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/system/runit.py b/lib/ansible/modules/system/runit.py index 5c027f44d5..43bc517400 100644 --- a/lib/ansible/modules/system/runit.py +++ b/lib/ansible/modules/system/runit.py @@ -141,7 +141,7 @@ class Sv(object): self.pid = None self.duration = None - self.svc_cmd = module.get_bin_path('sv', opt_dirs=self.extra_paths) + self.svc_cmd = module.get_bin_path('sv', opt_dirs=self.extra_paths, required=True) self.svstat_cmd = module.get_bin_path('sv', opt_dirs=self.extra_paths) self.svc_full = '/'.join([ self.service_dir, self.name ]) self.src_full = '/'.join([ self.service_src, self.name ])