mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Add examples of using multiple matching levels to Pillar docs
Fixes #29091
This commit is contained in:
parent
7c50533d3f
commit
45080f3629
2 changed files with 32 additions and 1 deletions
|
@ -122,7 +122,22 @@ An example ``top.sls`` may be as simple as the following:
|
|||
'*':
|
||||
- packages
|
||||
|
||||
Or much more complicated, using a variety of matchers:
|
||||
Any number of matchers can be added to the base environment. For example, here
|
||||
is an expanded version of the Pillar top file stated above:
|
||||
|
||||
/srv/pillar/top.sls:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
base:
|
||||
'*':
|
||||
- packages
|
||||
'web*':
|
||||
- apache
|
||||
- vim
|
||||
|
||||
Or an even more complicated example, using a variety of matchers in numerous
|
||||
environments:
|
||||
|
||||
/srv/pillar/top.sls:
|
||||
|
||||
|
|
|
@ -58,6 +58,22 @@ pillar available to it. Assuming the ``pillar_roots`` value of ``/srv/pillar``
|
|||
taken from above, the ``packages`` pillar would be located at
|
||||
``/srv/pillar/packages.sls``.
|
||||
|
||||
Any number of matchers can be added to the base environment. For example, here
|
||||
is an expanded version of the Pillar top file stated above:
|
||||
|
||||
/srv/pillar/top.sls:
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
base:
|
||||
'*':
|
||||
- packages
|
||||
'web*':
|
||||
- vim
|
||||
|
||||
In this expanded top file, minions that match ``web*`` will have access to the
|
||||
``/srv/pillar/pacakges.sls`` file, as well as the ``/srv/pillar/vim.sls`` file.
|
||||
|
||||
Another example shows how to use other standard top matching types
|
||||
to deliver specific salt pillar data to minions with different properties.
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue