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