Merge branch 'devel' of git://github.com/shirou/ansible into devel

reviewable/pr18780/r1
Michael DeHaan 11 years ago
commit 377b3f4b6f

@ -3,7 +3,7 @@
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
# #
#n This file is part of Ansible # This file is part of Ansible
# #
# Ansible is free software: you can redistribute it and/or modify # Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@ -2140,9 +2140,7 @@ def run_setup(module):
for (k,v) in facter_ds.items(): for (k,v) in facter_ds.items():
setup_options["facter_%s" % k] = v setup_options["facter_%s" % k] = v
# ditto for ohai, but just top level string keys # ditto for ohai
# because it contains a lot of nested stuff we can't use for
# templating w/o making a nicer key for it (TODO)
if ohai_path is not None: if ohai_path is not None:
rc, out, err = module.run_command(ohai_path) rc, out, err = module.run_command(ohai_path)
@ -2153,9 +2151,8 @@ def run_setup(module):
ohai = False ohai = False
if ohai: if ohai:
for (k,v) in ohai_ds.items(): for (k,v) in ohai_ds.items():
if type(v) == str or type(v) == unicode: k2 = "ohai_%s" % k.replace('-', '_')
k2 = "ohai_%s" % k.replace('-', '_') setup_options[k2] = v
setup_options[k2] = v
setup_result = { 'ansible_facts': {} } setup_result = { 'ansible_facts': {} }

Loading…
Cancel
Save