def get_machine_id():
 locations = ['/etc/machine-id', '/var/lib/dbus/machine-id']
 existing_locations = [loc for loc in locations if os.path.exists(loc)]
 if (not existing_locations):
  return {}
 else:
  with salt.utils.fopen(existing_locations[0]) as machineid:
   return {'machine_id': machineid.read().strip()}

def get_machine_id ( ) : locations = [ '/etc/machine-id' , '/var/lib/dbus/machine-id' ] existing_locations = [ loc for loc in locations if os . path . exists ( loc ) ] if ( not existing_locations ) : return { } else : with salt . utils . fopen ( existing_locations [ 0 ] ) as machineid : return { 'machine_id' : machineid . read ( ) . strip ( ) }
provide the machine-id .