|
|
@ -1641,16 +1641,8 @@ def run_setup(module):
|
|
|
|
# Look for the path to the facter and ohai binary and set
|
|
|
|
# Look for the path to the facter and ohai binary and set
|
|
|
|
# the variable to that path.
|
|
|
|
# the variable to that path.
|
|
|
|
|
|
|
|
|
|
|
|
facter_path = None
|
|
|
|
facter_path = module.get_bin_path('facter')
|
|
|
|
ohai_path = None
|
|
|
|
ohai_path = module.get_bin_path('ohai')
|
|
|
|
|
|
|
|
|
|
|
|
for dir in os.environ['PATH'].split(':'):
|
|
|
|
|
|
|
|
facter = os.path.join(dir, 'facter')
|
|
|
|
|
|
|
|
if os.path.exists(facter):
|
|
|
|
|
|
|
|
facter_path = facter
|
|
|
|
|
|
|
|
ohai = os.path.join(dir, 'ohai')
|
|
|
|
|
|
|
|
if os.path.exists(ohai):
|
|
|
|
|
|
|
|
ohai_path = ohai
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# if facter is installed, and we can use --json because
|
|
|
|
# if facter is installed, and we can use --json because
|
|
|
|
# ruby-json is ALSO installed, include facter data in the JSON
|
|
|
|
# ruby-json is ALSO installed, include facter data in the JSON
|
|
|
|