Add python info to facts

This commit is contained in:
Matt Martz 2016-02-19 12:59:58 -06:00
parent 7766a9a688
commit 7158eb489f

View file

@ -166,6 +166,7 @@ class Facts(object):
self.get_local_facts()
self.get_env_facts()
self.get_dns_facts()
self.get_python_facts()
def populate(self):
return self.facts
@ -782,6 +783,21 @@ class Facts(object):
pass
return size_total, size_available
def get_python_facts(self):
self.facts['python'] = {
'version': {
'major': sys.version_info[0],
'minor': sys.version_info[1],
'micro': sys.version_info[2],
'releaselevel': sys.version_info[3],
'serial': sys.version_info[4]
},
'version_info': list(sys.version_info),
'executable': sys.executable,
'type': sys.subversion[0]
}
class Hardware(Facts):
"""
This is a generic Hardware subclass of Facts. This should be further