blob: 7812410ed6a983569711584fb629d96940cdc8f9 [file] [log] [blame]
martin f. krafft3cd2a332014-10-28 15:58:23 +01001<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
4
5<html xmlns="http://www.w3.org/1999/xhtml">
6 <head>
7 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8
9 <title>reclass configuration file &mdash; reclass 1.4.1 documentation</title>
10
11 <link rel="stylesheet" href="_static/default.css" type="text/css" />
12 <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
13
14 <script type="text/javascript">
15 var DOCUMENTATION_OPTIONS = {
16 URL_ROOT: './',
17 VERSION: '1.4.1',
18 COLLAPSE_INDEX: false,
19 FILE_SUFFIX: '.html',
20 HAS_SOURCE: true
21 };
22 </script>
23 <script type="text/javascript" src="_static/jquery.js"></script>
24 <script type="text/javascript" src="_static/underscore.js"></script>
25 <script type="text/javascript" src="_static/doctools.js"></script>
26 <link rel="top" title="reclass 1.4.1 documentation" href="index.html" />
27 <link rel="next" title="Using reclass with Salt" href="salt.html" />
28 <link rel="prev" title="reclass manpage" href="manpage.html" />
29 </head>
30 <body>
31 <div class="related">
32 <h3>Navigation</h3>
33 <ul>
34 <li class="right" style="margin-right: 10px">
35 <a href="genindex.html" title="General Index"
36 accesskey="I">index</a></li>
37 <li class="right" >
38 <a href="salt.html" title="Using reclass with Salt"
39 accesskey="N">next</a> |</li>
40 <li class="right" >
41 <a href="manpage.html" title="reclass manpage"
42 accesskey="P">previous</a> |</li>
43 <li><a href="index.html">reclass</a> &raquo;</li>
44 </ul>
45 </div>
46
47 <div class="document">
48 <div class="documentwrapper">
49 <div class="bodywrapper">
50 <div class="body">
51
52 <div class="section" id="reclass-configuration-file">
53<h1>reclass configuration file<a class="headerlink" href="#reclass-configuration-file" title="Permalink to this headline">ΒΆ</a></h1>
54<p><strong>reclass</strong> can read some of its configuration from a file. The file is
55a YAML-file and simply defines key-value pairs.</p>
56<p>The configuration file can be used to set defaults for all the options that
57are otherwise configurable via the command-line interface, so please use the
58<tt class="docutils literal"><span class="pre">--help</span></tt> output of <strong>reclass</strong> (or the <a class="reference internal" href="manpage.html"><em>manual page</em></a>) for
59reference. The command-line option <tt class="docutils literal"><span class="pre">--nodes-uri</span></tt> corresponds to the key
60<tt class="docutils literal"><span class="pre">nodes_uri</span></tt> in the configuration file. For example:</p>
61<div class="highlight-python"><div class="highlight"><pre>storage_type: yaml_fs
62pretty_print: True
63output: json
64inventory_base_uri: /etc/reclass
65nodes_uri: ../nodes
66</pre></div>
67</div>
68<p><strong>reclass</strong> first looks in the current directory for the file called
69<tt class="docutils literal"><span class="pre">reclass-config.yml</span></tt> (see <tt class="docutils literal"><span class="pre">reclass/defaults.py</span></tt>) and if no such file is
70found, it looks in <tt class="docutils literal"><span class="pre">$HOME</span></tt>, then in <tt class="docutils literal"><span class="pre">/etc/reclass</span></tt>, and then &#8220;next to&#8221; the
71<tt class="docutils literal"><span class="pre">reclass</span></tt> script itself, i.e. if the script is symlinked to
72<tt class="docutils literal"><span class="pre">/srv/provisioning/reclass</span></tt>, then the the script will try to access
73<tt class="docutils literal"><span class="pre">/srv/provisioning/reclass-config.yml</span></tt>.</p>
74<p>Note that <tt class="docutils literal"><span class="pre">yaml_fs</span></tt> is currently the only supported <tt class="docutils literal"><span class="pre">storage_type</span></tt>, and
75it&#8217;s the default if you don&#8217;t set it.</p>
76<p>Adapters may implement their own lookup logic, of course, so make sure to read
77their documentation (for <a class="reference internal" href="salt.html"><em>Salt</em></a>, for <a class="reference internal" href="ansible.html"><em>Ansible</em></a>, and
78for <a class="reference internal" href="puppet.html"><em>Puppet</em></a>).</p>
79</div>
80
81
82 </div>
83 </div>
84 </div>
85 <div class="sphinxsidebar">
86 <div class="sphinxsidebarwrapper">
87 <h4>Previous topic</h4>
88 <p class="topless"><a href="manpage.html"
89 title="previous chapter">reclass manpage</a></p>
90 <h4>Next topic</h4>
91 <p class="topless"><a href="salt.html"
92 title="next chapter">Using reclass with Salt</a></p>
93<div id="searchbox" style="display: none">
94 <h3>Quick search</h3>
95 <form class="search" action="search.html" method="get">
96 <input type="text" name="q" />
97 <input type="submit" value="Go" />
98 <input type="hidden" name="check_keywords" value="yes" />
99 <input type="hidden" name="area" value="default" />
100 </form>
101 <p class="searchtip" style="font-size: 90%">
102 Enter search terms or a module, class or function name.
103 </p>
104</div>
105<script type="text/javascript">$('#searchbox').show(0);</script>
106 </div>
107 </div>
108 <div class="clearer"></div>
109 </div>
110 <div class="related">
111 <h3>Navigation</h3>
112 <ul>
113 <li class="right" style="margin-right: 10px">
114 <a href="genindex.html" title="General Index"
115 >index</a></li>
116 <li class="right" >
117 <a href="salt.html" title="Using reclass with Salt"
118 >next</a> |</li>
119 <li class="right" >
120 <a href="manpage.html" title="reclass manpage"
121 >previous</a> |</li>
122 <li><a href="index.html">reclass</a> &raquo;</li>
123 </ul>
124 </div>
125 <div class="footer">
126 &copy; Copyright 2013, martin f. krafft.
127 Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
128 </div>
129 </body>
130</html>