Merge pull request #8154 from gravyboat/develop

An additional example, and details on the template option for file.recurse.
This commit is contained in:
Colton Myers 2013-10-29 12:32:22 -07:00
commit a29bb6128e

View File

@ -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.