diff --git a/lib/ansible/module_utils/facts.py b/lib/ansible/module_utils/facts.py index c1951925e4..93fe68786d 100644 --- a/lib/ansible/module_utils/facts.py +++ b/lib/ansible/module_utils/facts.py @@ -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): """