move machine_id back to Facts class

pull/15221/head
Robin Roth 9 years ago
parent 5626c540ce
commit b861083dfb

@ -241,6 +241,10 @@ class Facts(object):
self.facts['architecture'] = data[0]
elif self.facts['system'] == 'OpenBSD':
self.facts['architecture'] = platform.uname()[5]
machine_id = get_file_content("/var/lib/dbus/machine-id") or get_file_content("/etc/machine-id")
if machine_id:
machine_id = machine_id.split('\n')[0]
self.facts["machine_id"] = machine_id
def get_local_facts(self):
@ -702,10 +706,6 @@ class Distribution(object):
except AttributeError:
pass
machine_id = get_file_content("/var/lib/dbus/machine-id") or get_file_content("/etc/machine-id")
if machine_id:
machine_id = machine_id.split('\n')[0]
self.facts["machine_id"] = machine_id
self.facts['os_family'] = self.facts['distribution']
distro = self.facts['distribution'].replace(' ', '_')
if distro in self.OS_FAMILY:

@ -1 +1 @@
Subproject commit 9eb2b557cd08f2a6d381ec0360fa47750146b65a
Subproject commit 4549ea5e8550217412e032ed0340e9d4a0b38923

@ -1 +1 @@
Subproject commit d9caac037cf10f0abaeff1430605387ab011d54f
Subproject commit 86f08bfcda17e95fb284f9a8b7c0a3cbf518173b
Loading…
Cancel
Save