Merge pull request #29724 from rallytime/fix-29091

Add examples of using multiple matching levels to Pillar docs
This commit is contained in:
Mike Place 2015-12-15 16:02:32 -07:00
commit c9ca1a371e
2 changed files with 32 additions and 1 deletions

View file

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

View file

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