martin f. krafft | 8acd49d | 2013-08-26 21:22:25 +0200 | [diff] [blame] | 1 | ========================== |
| 2 | reclass configuration file |
| 3 | ========================== |
| 4 | |reclass| can read some of its configuration from a file. The file is |
| 5 | a YAML-file and simply defines key-value pairs. |
| 6 | |
| 7 | The configuration file can be used to set defaults for all the options that |
| 8 | are otherwise configurable via the command-line interface, so please use the |
| 9 | ``--help`` output of |reclass| (or the :doc:`manual page <manpage>`) for |
| 10 | reference. 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 |
| 21 | found, 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 | |
| 26 | Note that ``yaml_fs`` is currently the only supported ``storage_type``, and |
| 27 | it's the default if you don't set it. |
| 28 | |
| 29 | Adapters may implement their own lookup logic, of course, so make sure to read |
| 30 | their documentation (for :doc:`Salt <salt>`, for :doc:`Ansible <ansible>`, and |
| 31 | for :doc:`Puppet <puppet>`). |
| 32 | |
| 33 | .. include:: substs.inc |