Add jinja_env and jinja_sls_env master configuration options documentation

This commit is contained in:
Corvin Mcpherson 2017-10-01 14:23:41 -04:00
parent 7091f8ec71
commit 19dcfcf1a0
3 changed files with 80 additions and 57 deletions

View file

@ -566,24 +566,35 @@
# The renderer to use on the minions to render the state data
#renderer: yaml_jinja
# TODO documentation
# Ignoring documentation for now
# (until agreement on implementation has been reached)
# Default jinja environment options for everything but
# salt sls files
# Default Jinja environment options for all templates except sls templates
#jinja_env:
# line_statement_prefix: '#'
# line_comment_prefix: '##'
# trim_blocks: True
# lstrip_blocks: True
# block_start_string: '{%'
# block_end_string: '%}'
# variable_start_string: '{{'
# variable_end_string: '}}'
# comment_start_string: '{#'
# comment_end_string: '#}'
# line_statement_prefix:
# line_comment_prefix:
# trim_blocks: False
# lstrip_blocks: False
# newline_sequence: '\n'
# keep_trailing_newline: False
# Jinja environment options for salt sls files
# Jinja environment options for sls templates
#jinja_sls_env:
# line_statement_prefix: '#'
# line_comment_prefix: '##'
# trim_blocks: True
# lstrip_blocks: True
# block_start_string: '{%'
# block_end_string: '%}'
# variable_start_string: '{{'
# variable_end_string: '}}'
# comment_start_string: '{#'
# comment_end_string: '#}'
# line_statement_prefix:
# line_comment_prefix:
# trim_blocks: False
# lstrip_blocks: False
# newline_sequence: '\n'
# keep_trailing_newline: False
# The failhard option tells the minions to stop immediately after the first
# failure detected in the state execution, defaults to False

View file

@ -537,24 +537,35 @@ syndic_user: salt
# The renderer to use on the minions to render the state data
#renderer: yaml_jinja
# TODO documentation
# Ignoring documentation for now
# (until agreement on implementation has been reached)
# Default jinja environment options for everything but
# salt sls files
# Default Jinja environment options for all templates except sls templates
#jinja_env:
# line_statement_prefix: '#'
# line_comment_prefix: '##'
# trim_blocks: True
# lstrip_blocks: True
# block_start_string: '{%'
# block_end_string: '%}'
# variable_start_string: '{{'
# variable_end_string: '}}'
# comment_start_string: '{#'
# comment_end_string: '#}'
# line_statement_prefix:
# line_comment_prefix:
# trim_blocks: False
# lstrip_blocks: False
# newline_sequence: '\n'
# keep_trailing_newline: False
# Jinja environment options for salt sls files
# Jinja environment options for sls templates
#jinja_sls_env:
# line_statement_prefix: '#'
# line_comment_prefix: '##'
# trim_blocks: True
# lstrip_blocks: True
# block_start_string: '{%'
# block_end_string: '%}'
# variable_start_string: '{{'
# variable_end_string: '}}'
# comment_start_string: '{#'
# comment_end_string: '#}'
# line_statement_prefix:
# line_comment_prefix:
# trim_blocks: False
# lstrip_blocks: False
# newline_sequence: '\n'
# keep_trailing_newline: False
# The failhard option tells the minions to stop immediately after the first
# failure detected in the state execution, defaults to False

View file

@ -1941,47 +1941,45 @@ the cloud profile or master config file, no templating will be performed.
userdata_template: jinja
.. conf_master:: jinja_line_statement_prefix
.. conf_master:: jinja_env
``jinja_line_statement_prefix``
---------------------
``jinja_env``
-------------
.. versionadded:: Oxygen
Default: ``''``
Default: ``{}``
If this is set to a string that is not empty, any line starting with this prefix
will be interpreted as a line statement by the jinja renderer.
Defaults to ``''`` and corresponds
to the Jinja environment init variable ``line_statement_prefix``.
.. note::
The `Jinja2 Environment documentation <http://jinja.pocoo.org/docs/api/#jinja2.Environment>` is the official source for the default values. Not all the options listed in the jinja documentation can be overridden using jinja_env or jinja_sls_env.
The default options are:
.. code-block:: yaml
jinja_line_statement_prefix: ''
.. conf_master:: jinja_line_comment_prefix
``jinja_line_comment_prefix``
---------------------
.. versionadded:: Oxygen
Default: ``''``
If this is set to a string that is not empty, any line starting with this prefix
will be interpreted as a line comment by the jinja renderer.
Defaults to ``''`` and corresponds
to the Jinja environment init variable ``line_comment_prefix``.
.. code-block:: yaml
jinja_line_comment_prefix: ''
jinja_env:
block_start_string: '{%'
block_end_string: '%}'
variable_start_string: '{{'
variable_end_string: '}}'
comment_start_string: '{#'
comment_end_string: '#}'
line_statement_prefix:
line_comment_prefix:
trim_blocks: False
lstrip_blocks: False
newline_sequence: '\n'
keep_trailing_newline: False
.. conf_master:: jinja_trim_blocks
``jinja_trim_blocks``
---------------------
.. deprecated:: Oxygen
Replaced by :conf_master:`jinja_env` and :conf_master:`jinja_sls_env`
.. versionadded:: 2014.1.0
Default: ``False``
@ -1999,6 +1997,9 @@ to the Jinja environment init variable ``trim_blocks``.
``jinja_lstrip_blocks``
-----------------------
.. deprecated:: Oxygen
Replaced by :conf_master:`jinja_env` and :conf_master:`jinja_sls_env`
.. versionadded:: 2014.1.0
Default: ``False``