From 8cc894bef2dbed2725ef4f54cb2cda551473cbd7 Mon Sep 17 00:00:00 2001 From: Yasser Nabi Date: Thu, 17 Jul 2014 17:53:12 +0100 Subject: [PATCH] Enable puppet facts Currently facter facts omit facts that a distributed via Puppet. This commit adds the `--puppet` option. In cases where puppet is not installed, the command sends a warning to STDERR *but* completes successfully. So should not cause any issues. The benefit is, filtering can be done based on facts set by Puppet. --- system/setup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/setup b/system/setup index 3194500cb2e..486304230bf 100644 --- a/system/setup +++ b/system/setup @@ -91,7 +91,7 @@ def run_setup(module): # if facter is installed, and we can use --json because # ruby-json is ALSO installed, include facter data in the JSON if facter_path is not None: - rc, out, err = module.run_command(facter_path + " --json") + rc, out, err = module.run_command(facter_path + " --puppet --json") facter = True try: facter_ds = json.loads(out)