1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Changed funtion name to get_ohai_data

This commit is contained in:
Nikhil Singh 2012-07-31 13:07:53 +05:30
parent ce5f3dd148
commit 526a0b1f60

View file

@ -18,7 +18,7 @@
# along with Ansible. If not, see <http://www.gnu.org/licenses/>. # along with Ansible. If not, see <http://www.gnu.org/licenses/>.
# #
def get_facter_data(): def get_ohai_data():
p = subprocess.Popen(["/usr/bin/env", "ohai"], stdout=subprocess.PIPE, stderr=subprocess.PIPE) p = subprocess.Popen(["/usr/bin/env", "ohai"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
(out, err) = p.communicate() (out, err) = p.communicate()
rc = p.returncode rc = p.returncode
@ -28,7 +28,7 @@ def main():
module = AnsibleModule( module = AnsibleModule(
argument_spec = dict() argument_spec = dict()
) )
rc, out, err = get_facter_data() rc, out, err = get_ohai_data()
if rc != 0: if rc != 0:
module.fail_json(msg=err) module.fail_json(msg=err)
else: else: