<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Base — Bcfg2 1.3.0 documentation</title> <link rel="stylesheet" href="../../../_static/default.css" type="text/css" /> <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../../../', VERSION: '1.3.0', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true }; </script> <script type="text/javascript" src="../../../_static/jquery.js"></script> <script type="text/javascript" src="../../../_static/underscore.js"></script> <script type="text/javascript" src="../../../_static/doctools.js"></script> <script type="text/javascript" src="../../../_static/sidebar.js"></script> <link rel="shortcut icon" href="../../../_static/favicon.ico"/> <link rel="top" title="Bcfg2 1.3.0 documentation" href="../../../index.html" /> <link rel="up" title="Plugins" href="../index.html" /> <link rel="next" title="Defaults" href="defaults.html" /> <link rel="prev" title="altsrc" href="altsrc.html" /> <link rel="stylesheet" href="../../../_static/bcfg2.css" type=""/> </head> <body> <div style="text-align: left; padding: 10px 10px 15px 15px"> <a href="../../../index.html"><img src="../../../_static/bcfg2_logo.png" border="0" alt="sampledoc"/></a> </div> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../../../genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > <a href="../../../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="defaults.html" title="Defaults" accesskey="N">next</a> |</li> <li class="right" > <a href="altsrc.html" title="altsrc" accesskey="P">previous</a> |</li> <li><a href="../../../index.html">home</a> | </li> <!--<li><a href="../../../search.html">search</a> | </li>--> <li><a href="../../../help/index.html">help</a> | </li> <li><a href="../../../contents.html">documentation </a> »</li> <li><a href="../../../contents.html" >Bcfg2 documentation 1.3.0</a> »</li> <li><a href="../../index.html" >The Bcfg2 Server</a> »</li> <li><a href="../index.html" accesskey="U">Plugins</a> »</li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body"> <div class="section" id="base"> <span id="server-plugins-structures-base"></span><h1>Base<a class="headerlink" href="#base" title="Permalink to this headline">ΒΆ</a></h1> <p class="deprecated"> <span class="versionmodified">Deprecated since version 1.2.0.</span></p> <div class="admonition warning"> <p class="first admonition-title">Warning</p> <p class="last">The Base plugin no longer receives new features/functionality. Please use <a class="reference internal" href="bundler/index.html#server-plugins-structures-bundler-index"><em>Bundler</em></a> instead.</p> </div> <p>The Base plugin is a structure plugin that provides the ability to add lists of unrelated entries into client configuration entry inventories.</p> <p>Base works much like Bundler in its file format. The main difference between Base and Bundler is that Base files are included in all clients’ configuration whereas bundles must be included explicitly in your Metadata. See the <a class="reference internal" href="bundler/index.html#server-plugins-structures-bundler-index"><em>Bundler</em></a> page for details.</p> <p>If you have lots of unconnected items (for instance: software packages whose configuration wasn’t modified, and that are also not depended on by other packages; or single directories or files not belonging to a package), using Bundles in Metadata would clutter or enlarge your <tt class="docutils literal"><span class="pre">Metadata/groups.xml</span></tt> file, because they all would need to be explicitly specified. <tt class="docutils literal"><span class="pre">Base/</span></tt> on the other hand is the perfect place to put these items.</p> <p>Without using Base, you would be forced to put them directly into your group definitions in <tt class="docutils literal"><span class="pre">groups.xml</span></tt>, either as many small bundles (substantially enlarging it) or into something like <tt class="docutils literal"><span class="pre">Bundler/unrelated-entries.xml</span></tt>. Using the latter is especially bad if you mix packages and services in your Bundle, since for any updated package in that bundle, the now-related services would be restarted.</p> <p>The Base entries can still be assigned based on group membership, but when they aren’t part of a group, each and every client gets the entry. So Base is also a great place to put entries that a large number of your clients will get.</p> <p>For example, you could have a file <tt class="docutils literal"><span class="pre">Base/packages.xml</span></tt></p> <div class="highlight-xml"><div class="highlight"><pre><span class="nt"><Base></span> <span class="nt"><Package</span> <span class="na">name=</span><span class="s">'acpid'</span><span class="nt">/></span> <span class="nt"><Package</span> <span class="na">name=</span><span class="s">'auditd'</span><span class="nt">/></span> [...] <span class="nt"><Group</span> <span class="na">name=</span><span class="s">'openSUSE11.2'</span><span class="nt">></span> <span class="nt"><Package</span> <span class="na">name=</span><span class="s">'syslog-ng'</span><span class="nt">/></span> <span class="nt"></Group></span> <span class="nt"><Group</span> <span class="na">name=</span><span class="s">'openSUSE11.3'</span><span class="nt">></span> <span class="nt"><Package</span> <span class="na">name=</span><span class="s">'rsyslog'</span><span class="nt">/></span> <span class="nt"></Group></span> [...] <span class="nt"><Package</span> <span class="na">name=</span><span class="s">'zlib'</span><span class="nt">/></span> <span class="nt"></Base></span> </pre></div> </div> <div class="admonition note"> <p class="first admonition-title">Note</p> <p class="last">You don’t have to reference to the files in Base from anywhere. As long as you include <tt class="docutils literal"><span class="pre">Base</span></tt> in your <tt class="docutils literal"><span class="pre">plugins</span> <span class="pre">=</span> <span class="pre">...</span></tt> line in <tt class="docutils literal"><span class="pre">bcfg2.conf</span></tt>, these are included automatically.</p> </div> <div class="admonition note"> <p class="first admonition-title">Note</p> <p class="last">Your Base files have to match the pattern <tt class="docutils literal"><span class="pre">Base/*.xml</span></tt> to be included.</p> </div> <p>The decision when to use Base and when to use Bundler depends on the configuration entry in question, and what you are trying to achieve.</p> <p>Base is mainly used for cases where you don’t want/need to explicitly include particular configuration items. Let’s say all your machines are various linux distributions. In this case, you may want to manage the <tt class="docutils literal"><span class="pre">/etc/hosts</span></tt> file using Base instead of Bundler since you will not have to include any Bundles in your Metadata. However, you could alternatively have a base ‘linux’ group that all the clients inherit which includes a <em>linux</em> Bundle with the <tt class="docutils literal"><span class="pre">/etc/hosts</span></tt> configuration entry.</p> </div> </div> </div> </div> <div class="sphinxsidebar"> <div class="sphinxsidebarwrapper"> <h4>Previous topic</h4> <p class="topless"><a href="altsrc.html" title="previous chapter">altsrc</a></p> <h4>Next topic</h4> <p class="topless"><a href="defaults.html" title="next chapter">Defaults</a></p> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../../../_sources/server/plugins/structures/base.txt" rel="nofollow">Show Source</a></li> </ul> <div id="searchbox" style="display: none"> <h3>Quick search</h3> <form class="search" action="../../../search.html" method="get"> <input type="text" name="q" /> <input type="submit" value="Go" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> <p class="searchtip" style="font-size: 90%"> Enter search terms or a module, class or function name. </p> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="clearer"></div> </div> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../../../genindex.html" title="General Index" >index</a></li> <li class="right" > <a href="../../../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="defaults.html" title="Defaults" >next</a> |</li> <li class="right" > <a href="altsrc.html" title="altsrc" >previous</a> |</li> <li><a href="../../../index.html">home</a> | </li> <!--<li><a href="../../../search.html">search</a> | </li>--> <li><a href="../../../help/index.html">help</a> | </li> <li><a href="../../../contents.html">documentation </a> »</li> <li><a href="../../../contents.html" >Bcfg2 documentation 1.3.0</a> »</li> <li><a href="../../index.html" >The Bcfg2 Server</a> »</li> <li><a href="../index.html" >Plugins</a> »</li> </ul> </div> <div class="footer"> © Copyright 2009-2013, Narayan Desai. Last updated on Mar 20, 2013. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3. </div> </body> </html>