blob: 497e6f7886b24b15c7300a2b983a2d380f6ed06e [file] [log] [blame]
martin f. krafft8acd49d2013-08-26 21:22:25 +02001==========================
2reclass configuration file
3==========================
4|reclass| can read some of its configuration from a file. The file is
5a YAML-file and simply defines key-value pairs.
6
7The configuration file can be used to set defaults for all the options that
8are otherwise configurable via the command-line interface, so please use the
9``--help`` output of |reclass| (or the :doc:`manual page <manpage>`) for
10reference. The command-line option ``--nodes-uri`` corresponds to the key
11``nodes_uri`` in the configuration file. For example::
12
13 storage_type: yaml_fs
14 pretty_print: True
15 output: json
16 inventory_base_uri: /etc/reclass
17 nodes_uri: ../nodes
18
19|reclass| first looks in the current directory for the file called
20``reclass-config.yml`` (see ``reclass/defaults.py``) and if no such file is
21found, it looks in ``$HOME``, then in ``/etc/reclass``, and then "next to" the
22``reclass`` script itself, i.e. if the script is symlinked to
23``/srv/provisioning/reclass``, then the the script will try to access
24``/srv/provisioning/reclass-config.yml``.
25
26Note that ``yaml_fs`` is currently the only supported ``storage_type``, and
27it's the default if you don't set it.
28
29Adapters may implement their own lookup logic, of course, so make sure to read
30their documentation (for :doc:`Salt <salt>`, for :doc:`Ansible <ansible>`, and
31for :doc:`Puppet <puppet>`).
32
33.. include:: substs.inc