mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
removed Darwin get_uptime_facts as it seems to crash on OS X, will waiy for a
patch tested by someone that has access to the platform
This commit is contained in:
parent
3312a76987
commit
5eae435357
1 changed files with 0 additions and 6 deletions
|
@ -1592,7 +1592,6 @@ class Darwin(Hardware):
|
|||
self.get_mac_facts()
|
||||
self.get_cpu_facts()
|
||||
self.get_memory_facts()
|
||||
self.get_uptime_facts()
|
||||
return self.facts
|
||||
|
||||
def get_sysctl(self):
|
||||
|
@ -1640,11 +1639,6 @@ class Darwin(Hardware):
|
|||
if rc == 0:
|
||||
self.facts['memfree_mb'] = long(out.splitlines()[-1].split()[1]) / 1024 / 1024
|
||||
|
||||
def get_uptime_facts(self):
|
||||
kern_boottime = self.sysctl['kern.boottime']
|
||||
boottime = datetime.datetime.strptime(kern_boottime, "%a %b %d %H:%M:%S %Y")
|
||||
delta = datetime.datetime.now() - boottime
|
||||
self.facts['uptime_seconds'] = int(delta.total_seconds())
|
||||
|
||||
class Network(Facts):
|
||||
"""
|
||||
|
|
Loading…
Reference in a new issue