|
|
|
@ -29,15 +29,14 @@ description:
|
|
|
|
|
(U(http://jinja.pocoo.org/docs/)) - documentation on the template
|
|
|
|
|
formatting can be found in the Template Designer Documentation
|
|
|
|
|
(U(http://jinja.pocoo.org/docs/templates/)).
|
|
|
|
|
- "Six additional variables can be used in templates: C(ansible_managed)
|
|
|
|
|
(configurable via the C(defaults) section of C(ansible.cfg)) contains a string
|
|
|
|
|
which can be used to describe the template name, host, modification time of the
|
|
|
|
|
template file and the owner uid, C(template_host) contains the node name of
|
|
|
|
|
the template's machine, C(template_uid) the owner, C(template_path) the
|
|
|
|
|
absolute path of the template, C(template_fullpath) is the absolute path of the
|
|
|
|
|
template, and C(template_run_date) is the date that the template was rendered. Note that including
|
|
|
|
|
a string that uses a date in the template will result in the template being marked 'changed'
|
|
|
|
|
each time."
|
|
|
|
|
- "Six additional variables can be used in templates:
|
|
|
|
|
C(ansible_managed) (configurable via the C(defaults) section of C(ansible.cfg)) contains a string which can be used to
|
|
|
|
|
describe the template name, host, modification time of the template file and the owner uid.
|
|
|
|
|
C(template_host) contains the node name of the template's machine.
|
|
|
|
|
C(template_uid) the numeric user id of the owner.
|
|
|
|
|
C(template_path) the path of the template.
|
|
|
|
|
C(template_fullpath) is the absolute path of the template.
|
|
|
|
|
C(template_run_date) is the date that the template was rendered."
|
|
|
|
|
options:
|
|
|
|
|
src:
|
|
|
|
|
description:
|
|
|
|
@ -63,6 +62,7 @@ options:
|
|
|
|
|
choices: [ "yes", "no" ]
|
|
|
|
|
default: "yes"
|
|
|
|
|
notes:
|
|
|
|
|
- Including a string that uses a date in the template will result in the template being marked 'changed' each time
|
|
|
|
|
- "Since Ansible version 0.9, templates are loaded with C(trim_blocks=True)."
|
|
|
|
|
- "Also, you can override jinja2 settings by adding a special header to template file.
|
|
|
|
|
i.e. C(#jinja2:variable_start_string:'[%' , variable_end_string:'%]', trim_blocks: False)
|
|
|
|
|