def _remove_boot_volume(module, profitbricks, datacenter_id, server_id):
 try:
  server = profitbricks.get_server(datacenter_id, server_id)
  volume_id = server['properties']['bootVolume']['id']
  volume_response = profitbricks.delete_volume(datacenter_id, volume_id)
 except Exception:
  e = get_exception()
  module.fail_json(msg=("failed to remove the server's boot volume: %s" % str(e)))

def _remove_boot_volume ( module , profitbricks , datacenter_id , server_id ) : try : server = profitbricks . get_server ( datacenter_id , server_id ) volume_id = server [ 'properties' ] [ 'bootVolume' ] [ 'id' ] volume_response = profitbricks . delete_volume ( datacenter_id , volume_id ) except Exception : e = get_exception ( ) module . fail_json ( msg = ( "failed to remove the server's boot volume: %s" % str ( e ) ) )
remove the boot volume from the server .