template – retrieve contents of file after templating with Jinja2

From Get docs
< Lookup PluginsAnsible/docs/2.7/plugins/lookup/template


template – retrieve contents of file after templating with Jinja2

Synopsis

  • this is mostly a noop, to be used as a with_list loop when you dont want the content transformed in any way.

Parameters

Parameter Choices/Defaults Configuration Comments

_terms

-

list of files to template



Examples

- name: show templating results
  debug: msg="{{ lookup('template', './some_template.j2') }}

Return Values

Common return values are documented here, the following are the fields unique to this lookup:

Key Returned Description

_raw

-

file(s) content after templating





Status

Authors

Hint

If you notice any issues in this documentation you can edit this document to improve it.


© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.7/plugins/lookup/template.html