From 362760413fc2710ac50eab323e01e7bfb0076dee Mon Sep 17 00:00:00 2001 From: Ton Kersten Date: Fri, 19 Feb 2016 10:43:55 +0100 Subject: [PATCH] Fix facter path --- system/facter.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/system/facter.py b/system/facter.py index 6c09877fcbe..b594836df9c 100644 --- a/system/facter.py +++ b/system/facter.py @@ -47,7 +47,10 @@ def main(): argument_spec = dict() ) - cmd = ["/usr/bin/env", "facter", "--puppet", "--json"] + facter_path = module.get_bin_path('facter', opt_dirs=['/opt/puppetlabs/bin']) + + cmd = [facter_path, "--puppet", "--json"] + rc, out, err = module.run_command(cmd, check_rc=True) module.exit_json(**json.loads(out))