salt/doc/topics/targeting/nodegroups.rst
Erik Johnson cf365f77cd Convert shell command examples to bash code-block
This commit modifes a number of files which have command-line examples
so that the code-block directive is used. This provides more
visually-appealing syntax highlighting.

More commits like this will follow, this commit is part of an overall
documentation audit that I am performing.
2013-08-10 21:55:51 -05:00

38 lines
989 B
ReStructuredText

===========
Node groups
===========
.. glossary::
Node group
A predefined group of minions declared in the master configuration file
:conf_master:`nodegroups` setting as a compound target.
Nodegroups are declared using a compound target specification. The compound
target documentation can be found :doc:`here <compound>`.
The :conf_master:`nodegroups` master config file parameter is used to define
nodegroups. Here's an example nodegroup configuration:
.. code-block:: yaml
nodegroups:
group1: 'L@foo.domain.com,bar.domain.com,baz.domain.com or bl*.domain.com'
group2: 'G@os:Debian and foo.domain.com'
To match a nodegroup on the CLI, use the ``-N`` command-line option:
.. code-block:: bash
salt -N group1 test.ping
To match in your :term:`top file`, make sure to put ``- match: nodegroup`` on
the line directly following the nodegroup name.
.. code-block:: yaml
base:
group1:
- match: nodegroup
- webserver