init
This commit is contained in:
commit
c5cd492449
475 changed files with 27928 additions and 0 deletions
22
technology/tools/Ansible/lookups/ansible.builtin.template.md
Normal file
22
technology/tools/Ansible/lookups/ansible.builtin.template.md
Normal file
|
@ -0,0 +1,22 @@
|
|||
# ansible.builtin.template
|
||||
Returns a list of strings; for each template in the list of templates you pass in, returns a string containing the results of processing that template.
|
||||
|
||||
## Parameters
|
||||
| Parameter | Type | Description |
|
||||
| ----------------- | ---------- | ---------------------------------------------------------------------------- |
|
||||
| **template_vars** | dictionary | A dictionary, the keys become additional variables available for templating. |
|
||||
|
||||
## Examples
|
||||
```yml
|
||||
- name: show templating results
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ lookup('ansible.builtin.template', './some_template.j2') }}"
|
||||
|
||||
- name: show templating results with different variable start and end string
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ lookup('ansible.builtin.template', './some_template.j2', variable_start_string='[%', variable_end_string='%]') }}"
|
||||
|
||||
- name: show templating results with different comment start and end string
|
||||
ansible.builtin.debug:
|
||||
msg: "{{ lookup('ansible.builtin.template', './some_template.j2', comment_start_string='[#', comment_end_string='#]') }}"
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue