blob: c87114e23d9188b47ef20903ec128139540eabd1 [file] [log] [blame]
martin f. krafft8acd49d2013-08-26 21:22:25 +02001=============
2Using reclass
3=============
4For information on how to use |reclass| directly, call ``reclass --help``
5and study the output, or have a look at its :doc:`manual page <manpage>`.
6
7The three options, ``--inventory-base-uri``, ``--nodes-uri``, and
8``--classes-uri`` together specify the location of the inventory. If the base
9URI is specified, then it is prepended to the other two URIs, unless they are
10absolute URIs. If these two URIs are not specified, they default to ``nodes``
11and ``classes``. Therefore, if your inventory is in ``/etc/reclass/nodes`` and
12``/etc/reclass/classes``, all you need to specify is the base URI as
13``/etc/reclass`` which is actually the default (specified in
14``reclass/defaults.py``).
15
16If you've installed |reclass| from source as per the :doc:`installation
17instructions <install>`, try to run it from the source directory like this::
18
19 $ reclass -b examples/ --inventory
20 $ reclass -b examples/ --node localhost
21
22This will make it use the data from ``examples/nodes`` and
23``examples/classes``, and you can surely make your own way from here.
24
25On Debian-systems, use the following::
26
27 $ reclass -b /usr/share/doc/reclass/examples/ --inventory
28 $ reclass -b /usr/share/doc/reclass/examples/ --node localhost
29
30More commonly, however, use of |reclass| will happen indirectly, and through
31so-called adapters. The job of an adapter is to translate between different
32invocation paradigms, provide a sane set of default options, and massage the
33data from |reclass| into the format expected by the automation tool in use.
34Please have a look at the respective README files for these adapters, i.e.
35for :doc:`Salt <salt>`, for :doc:`Ansible <ansible>`, and for :doc:`Puppet
36<puppet>`.
37
38.. include:: substs.inc