mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Fix some pilar docs that did not make much sense
This commit is contained in:
parent
c8355fdf23
commit
1c9295f20b
@ -55,7 +55,6 @@ files.
|
|||||||
apache: apache2
|
apache: apache2
|
||||||
git: git-core
|
git: git-core
|
||||||
{% endif %}
|
{% endif %}
|
||||||
somekey: globalvalue
|
|
||||||
|
|
||||||
Now this data can be used from within modules, renderers, State SLS files, and
|
Now this data can be used from within modules, renderers, State SLS files, and
|
||||||
more via the shared pillar `dict`_:
|
more via the shared pillar `dict`_:
|
||||||
@ -74,35 +73,6 @@ more via the shared pillar `dict`_:
|
|||||||
- installed
|
- installed
|
||||||
- name: {{ pillar['git'] }}
|
- name: {{ pillar['git'] }}
|
||||||
|
|
||||||
To use pillar data in a file that is managed on a minion, use a file state like
|
|
||||||
this:
|
|
||||||
|
|
||||||
``/srv/salt/top.sls``
|
|
||||||
|
|
||||||
.. code-block:: yaml
|
|
||||||
|
|
||||||
base:
|
|
||||||
'*':
|
|
||||||
- managed_files
|
|
||||||
|
|
||||||
``/srv/salt/managed_files.sls``
|
|
||||||
|
|
||||||
.. code-block:: yaml
|
|
||||||
|
|
||||||
/tmp/some-managed-file.txt:
|
|
||||||
file:
|
|
||||||
- managed
|
|
||||||
- template: jinja
|
|
||||||
- source: salt://files/some-managed-file.txt
|
|
||||||
|
|
||||||
``/srv/salt/files/some-managed-file.txt``
|
|
||||||
|
|
||||||
.. code-block:: yaml
|
|
||||||
|
|
||||||
This will yield 'globalvalue' on all minions but will yield 'specialvalue'
|
|
||||||
on 'someminion':
|
|
||||||
somekey has value: {{ pillar['somekey'] }}
|
|
||||||
|
|
||||||
.. _`dict`: http://docs.python.org/library/stdtypes.html#mapping-types-dict
|
.. _`dict`: http://docs.python.org/library/stdtypes.html#mapping-types-dict
|
||||||
|
|
||||||
Viewing Minion Pillar
|
Viewing Minion Pillar
|
||||||
|
Loading…
Reference in New Issue
Block a user