def get_parser():
""" creates the parser for the ansible-role command line utility """
parser = argparse.ArgumentParser(
prog=os.path.split(sys.argv[0])[-1],
formatter_class=HelpFormatter,)
parser.add_argument('rolename', type=str, nargs=1,)
parser.add_argument('host', type=str, nargs='?', default='localhost',)
parser.add_argument('--module-path', '-M',)
return parser
评论列表
文章目录