FEAT: cl-builder-image now removes machine-id

master 3.7.2.2
idziubenko 2 years ago
parent 57874e534e
commit ce3ccdd636

@ -2212,3 +2212,10 @@ class Builder(Update):
def is_update_action(self, action):
return action == Actions.Update
def remove_machine_id(self, builder_path):
try:
os.unlink(path.join(builder_path, 'etc/machine-id'))
return True
except OSError as e:
raise BuilderError(_("failed to find /etc/machine-id"))

@ -119,6 +119,10 @@ class ClBuilderImageAction(Action):
'method': 'Builder.remove_video_drivers(cl_builder_path)',
'condition': lambda Get: Get('cl_builder_videodrv_set') == 'off'
},
{'name': 'remove_machine_id',
'essential': False,
'method': 'Builder.remove_machine_id(cl_builder_path)'
},
{'name': 'trim_reps',
'foreach': 'cl_builder_sync_rep',
'message': __("Cleaning the history of the {eachvar:capitalize} "

Loading…
Cancel
Save