(vargs)
return args
For the ansible-runner worker cleanup command
    converts the dictionary (parsed argparse variables) used for python interface
    into a string of CLI options, which has to be used on execution nodes.
For the ansible-runner worker cleanup command
    converts the dictionary (parsed argparse variables) used for python interface
    into a string of CLI options, which has to be used on execution nodes.
For the ansible - runner worker cleanup command converts the dictionary ( parsed argparse variables ) used for python interface into a string of CLI options which has to be used on execution nodes .
def _convert_args_to_cli(vargs):
    """
    For the ansible-runner worker cleanup command
    converts the dictionary (parsed argparse variables) used for python interface
    into a string of CLI options, which has to be used on execution nodes.
    """
    args = ['cleanup']
    for option in ('exclude_strings', 'remove_images'):
        if vargs.get(option):
            args.append('--{}={}'.format(option.replace('_', '-'), ' '.join(vargs.get(option))))
    for option in ('file_pattern', 'image_prune', 'process_isolation_executable', 'grace_period'):
        if vargs.get(option) is True:
            args.append('--{}'.format(option.replace('_', '-')))
        elif vargs.get(option) not in (None, ''):
            args.append('--{}={}'.format(option.replace('_', '-'), vargs.get(option)))
    return args
def _convert_args_to_cli ( vargs ) : args = [ 'cleanup' ] for option in ( 'exclude_strings' , 'remove_images' ) : if vargs . get ( option ) : args . append ( '--{}={}' . format ( option . replace ( '_' , '-' ) , ' ' . join ( vargs . get ( option ) ) ) ) for option in ( 'file_pattern' , 'image_prune' , 'process_isolation_executable' , 'grace_period' ) : if vargs . get ( option ) is True : args . append ( '--{}' . format ( option . replace ( '_' , '-' ) ) ) elif vargs . get ( option ) not in ( None , '' ) : args . append ( '--{}={}' . format ( option . replace ( '_' , '-' ) , vargs . get ( option ) ) ) return args