def task_enable_flocker_agent(distribution, action='start'):
 validate_start_action(action)
 if is_systemd_distribution(distribution):
  return sequence([run_from_args(['systemctl', 'enable', 'flocker-dataset-agent']), run_from_args(['systemctl', action.lower(), 'flocker-dataset-agent'])])
 elif is_ubuntu(distribution):
  return sequence([run_from_args(['service', 'flocker-dataset-agent', action.lower()])])
 else:
  raise DistributionNotSupported(distribution=distribution)

def task_enable_flocker_agent ( distribution , action = 'start' ) : validate_start_action ( action ) if is_systemd_distribution ( distribution ) : return sequence ( [ run_from_args ( [ 'systemctl' , 'enable' , 'flocker-dataset-agent' ] ) , run_from_args ( [ 'systemctl' , action . lower ( ) , 'flocker-dataset-agent' ] ) ] ) elif is_ubuntu ( distribution ) : return sequence ( [ run_from_args ( [ 'service' , 'flocker-dataset-agent' , action . lower ( ) ] ) ] ) else : raise DistributionNotSupported ( distribution = distribution )
enable the flocker agents .