Fix facter path

This commit is contained in:
Ton Kersten 2016-02-19 10:43:55 +01:00 committed by Matt Clay
parent 383403282f
commit fb471fc0a8

View file

@ -45,7 +45,10 @@ def main():
argument_spec = dict() 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) rc, out, err = module.run_command(cmd, check_rc=True)
module.exit_json(**json.loads(out)) module.exit_json(**json.loads(out))