mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Merge pull request #8154 from gravyboat/develop
An additional example, and details on the template option for file.recurse.
This commit is contained in:
commit
a29bb6128e
@ -181,6 +181,25 @@ would look something like this:
|
|||||||
file.recurse:
|
file.recurse:
|
||||||
- source: salt://code/flask
|
- source: salt://code/flask
|
||||||
- include_empty: True
|
- include_empty: True
|
||||||
|
|
||||||
|
A more complex ``recurse`` example:
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
{% set site_user = 'testuser' %}
|
||||||
|
{% set site_name = 'test_site' %}
|
||||||
|
{% set project_name = 'test_proj' %}
|
||||||
|
{% set sites_dir = 'test_dir' %}
|
||||||
|
|
||||||
|
django-project:
|
||||||
|
file.recurse:
|
||||||
|
- name: {{ sites_dir }}/{{ site_name }}/{{ project_name }}
|
||||||
|
- user: {{ site_user }}
|
||||||
|
- dir_mode: 2775
|
||||||
|
- file_mode: '0644'
|
||||||
|
- template: jinja
|
||||||
|
- source: salt://project/templates_dir
|
||||||
|
- include_empty: True
|
||||||
'''
|
'''
|
||||||
|
|
||||||
# Import python libs
|
# Import python libs
|
||||||
@ -1401,6 +1420,10 @@ def recurse(name,
|
|||||||
used to render the downloaded file, currently jinja, mako, and wempy
|
used to render the downloaded file, currently jinja, mako, and wempy
|
||||||
are supported
|
are supported
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
|
||||||
|
The template option is required when recursively applying templates.
|
||||||
|
|
||||||
context
|
context
|
||||||
Overrides default context variables passed to the template.
|
Overrides default context variables passed to the template.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user