New in version 1.9.2.
ansible_managed
(configurable via the defaults
section of 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, template_host
contains the node name of the template’s machine, template_uid
the owner, template_path
the absolute path of the template, template_fullpath
is the absolute path of the template, and 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.parameter | required | default | choices | comments |
---|---|---|---|---|
dest |
yes | Location to render the template to on the remote machine. | ||
src |
yes | Path of a Jinja2 formatted template on the local server. This can be a relative or absolute path. |
- name: Create a file from a Jinja2 template win_template: src: /mytemplates/file.conf.j2 dest: C:\temp\file.conf
Note
trim_blocks=True
.#jinja2: newline_sequence:'\r\n'
and ensure each line of the template ends with \r\nThis module is flagged as stableinterface which means that the maintainers for this module guarantee that no backward incompatible interface changes will be made.
This module is maintained by those with core commit privileges
For more information on what this means please read Module Support
For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Helping Testing PRs and Developing Modules.