def task_configure_flocker_agent(control_node, dataset_backend, dataset_backend_configuration, logging_config=None):
 dataset_backend_configuration = dataset_backend_configuration.copy()
 dataset_backend_configuration.update({u'backend': dataset_backend.name})
 content = {'version': 1, 'control-service': {'hostname': control_node, 'port': 4524}, 'dataset': dataset_backend_configuration}
 if (logging_config is not None):
  content['logging'] = logging_config
 put_config_file = put(path='/etc/flocker/agent.yml', content=yaml.safe_dump(content), log_content_filter=_remove_dataset_fields)
 return sequence([put_config_file])

def task_configure_flocker_agent ( control_node , dataset_backend , dataset_backend_configuration , logging_config = None ) : dataset_backend_configuration = dataset_backend_configuration . copy ( ) dataset_backend_configuration . update ( { u'backend' : dataset_backend . name } ) content = { 'version' : 1 , 'control-service' : { 'hostname' : control_node , 'port' : 4524 } , 'dataset' : dataset_backend_configuration } if ( logging_config is not None ) : content [ 'logging' ] = logging_config put_config_file = put ( path = '/etc/flocker/agent.yml' , content = yaml . safe_dump ( content ) , log_content_filter = _remove_dataset_fields ) return sequence ( [ put_config_file ] )
configure the flocker agents by writing out the configuration file .