move machine_id back to Facts class

This commit is contained in:
Robin Roth 2016-04-27 09:29:39 +02:00
parent 5626c540ce
commit b861083dfb
3 changed files with 6 additions and 6 deletions

View file

@ -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