diff --git a/docs/bin/plugin_formatter.py b/docs/bin/plugin_formatter.py index 2bca0bfde21..2d612a4605c 100755 --- a/docs/bin/plugin_formatter.py +++ b/docs/bin/plugin_formatter.py @@ -334,7 +334,7 @@ def generate_parser(): p.add_option("-A", "--ansible-version", action="store", dest="ansible_version", default="unknown", help="Ansible version number") p.add_option("-M", "--module-dir", action="store", dest="module_dir", default=MODULEDIR, help="Ansible library path") p.add_option("-P", "--plugin-type", action="store", dest="plugin_type", default='module', help="The type of plugin (module, lookup, etc)") - p.add_option("-T", "--template-dir", action="store", dest="template_dir", default="hacking/templates", help="directory containing Jinja2 templates") + p.add_option("-T", "--template-dir", action="append", dest="template_dir", help="directory containing Jinja2 templates") p.add_option("-t", "--type", action='store', dest='type', choices=['rst'], default='rst', help="Document type") p.add_option("-o", "--output-dir", action="store", dest="output_dir", default=None, help="Output directory for module files") p.add_option("-I", "--includes-file", action="store", dest="includes_file", default=None, help="Create a file containing list of processed modules") @@ -651,6 +651,8 @@ def main(): # INIT p = generate_parser() (options, args) = p.parse_args() + if not options.template_dir: + options.template_dir = ["hacking/templates"] validate_options(options) display.verbosity = options.verbosity plugin_type = options.plugin_type