diff --git a/.gitignore b/.gitignore index be35963353..36a4de253d 100644 --- a/.gitignore +++ b/.gitignore @@ -22,10 +22,10 @@ docs/man/man3/* *.sublime-project *.sublime-workspace # docsite stuff... -docsite/rst/modules -docsite/*.html -docsite/_static/*.gif -docsite/_static/*.png -docsite/_static/websupport.js +docsite/latest/rst/modules +docsite/latest/*.html +docsite/latest/_static/*.gif +docsite/latest/_static/*.png +docsite/latest/_static/websupport.js # deb building stuff... debian/ diff --git a/Makefile b/Makefile index bc6c7bef75..b433ec16f8 100644 --- a/Makefile +++ b/Makefile @@ -177,22 +177,8 @@ deb: debian modulepages: PYTHONPATH=./lib $(PYTHON) hacking/module_formatter.py -A $(VERSION) -t man -o docs/man/man3/ --module-dir=library --template-dir=hacking/templates -modulejson: - mkdir -p docs/json - PYTHONPATH=./lib $(PYTHON) hacking/module_formatter.py -A $(VERSION) -t json -o docs/json --module-dir=library --template-dir=hacking/templates - -modulejs: - mkdir -p docs/js - make modulejson - PYTHONPATH=./lib $(PYTHON) hacking/module_formatter.py -A $(VERSION) -t js -o docs/js --module-dir=docs/json --template-dir=hacking/templates - # because this requires Sphinx it is not run as part of every build, those building the RPM and so on can ignore this webdocs: (cd docsite/latest; make docs) - PYTHONPATH=./lib $(PYTHON) hacking/module_formatter.py -A $(VERSION) -t json -o docs/json --module-dir=library --template-dir=hacking/templates - -modulejs: modulejson - -(mkdir -p docs/json) - PYTHONPATH=./lib $(PYTHON) hacking/module_formatter.py -A $(VERSION) -t js -o docs/json --module-dir=library --template-dir=hacking/templates diff --git a/lib/ansible/utils/template.py b/lib/ansible/utils/template.py index 78d71a9518..f7b0931d3e 100644 --- a/lib/ansible/utils/template.py +++ b/lib/ansible/utils/template.py @@ -432,9 +432,19 @@ def _get_filter_plugins(): return FILTER_PLUGINS +def _smush_braces(data): + ''' smush Jinaj2 braces so unresolved templates like {{ foo }} don't get parsed weird by key=value code ''' + while data.find('{{ ') != -1: + data = data.replace('{{ ', '{{') + while data.find(' }}') != -1: + data = data.replace(' }}', '}}') + return data + def template_from_string(basedir, data, vars): ''' run a file through the (Jinja2) templating engine ''' + data = _smush_braces(data) + try: if type(data) == str: data = unicode(data, 'utf-8')