<!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>info.xml — 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="The Bcfg2 Server" href="index.html" /> <link rel="next" title="Bcfg2 Snapshots" href="snapshots/index.html" /> <link rel="prev" title="Configuration Entries" href="configurationentries.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="snapshots/index.html" title="Bcfg2 Snapshots" accesskey="N">next</a> |</li> <li class="right" > <a href="configurationentries.html" title="Configuration Entries" 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" accesskey="U">The Bcfg2 Server</a> »</li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body"> <div class="section" id="info-xml"> <span id="server-info"></span><h1>info.xml<a class="headerlink" href="#info-xml" title="Permalink to this headline">¶</a></h1> <p>Various file properties for entries served by most generator plugins, including <a class="reference internal" href="plugins/generators/cfg.html#server-plugins-generators-cfg"><em>Cfg</em></a>, <a class="reference internal" href="plugins/generators/sslca.html#server-plugins-generators-sslca"><em>SSLCA</em></a>, and <a class="reference internal" href="plugins/generators/sshbase.html#server-plugins-generators-sshbase"><em>SSHbase</em></a>, are controlled through the use of <tt class="docutils literal"><span class="pre">info.xml</span></tt> files.</p> <p>By default, these plugins are set to write files to the filesystem with owner <strong>root</strong>, group <strong>root</strong>, and mode <strong>644</strong> (read and write for owner, read only for group and other). These options, and a few others, can be overridden through use of <tt class="docutils literal"><span class="pre">info.xml</span></tt> files. Each config file directory can have a <tt class="docutils literal"><span class="pre">info.xml</span></tt> file if needed.</p> <dl class="schema" id="schema:info.xsd"> <dt id="schema:info.xsd"> <!--[schema:info.xsd]--><em>schema</em> <strong>info.xsd</strong><a class="headerlink" href="#schema:info.xsd" title="Permalink to this definition">¶</a></dt> </dt> <dd><blockquote class="first"> <div><tt class="docutils literal"><span class="pre">info.xml</span></tt> schema for Bcfg2</div></blockquote> <dl class="last element" id="element:FileInfo"> <dt id="element:FileInfo"> <!--[element:FileInfo]--><em>element</em> <strong>FileInfo</strong><a class="headerlink" href="#element:FileInfo" title="Permalink to this definition">¶</a></dt> </dt> <dd><blockquote class="first"> <div>Top-level tag for <tt class="docutils literal"><span class="pre">info.xml</span></tt>.</div></blockquote> <dl class="last docutils" id="complexType:FileInfo"> <dt>Child elements:</dt> <dd><ul class="first last"> <li><dl class="element" id="element:Group"> <dt id="element:Group"> <!--[element:Group]--><em>element</em> <strong>Group</strong><a class="headerlink" href="#element:Group" title="Permalink to this definition">¶</a></dt> </dt> <dd><p class="first"></p> <p class="last">Type: <a class="reference internal" href="#complexType:InfoGroupType"><tt class="docutils literal"><span class="pre">InfoGroupType</span></tt></a></p> </dd> </dl> </li> <li><dl class="element" id="element:Client"> <dt id="element:Client"> <!--[element:Client]--><em>element</em> <strong>Client</strong><a class="headerlink" href="#element:Client" title="Permalink to this definition">¶</a></dt> </dt> <dd><p class="first"></p> <p class="last">Type: <a class="reference internal" href="#complexType:InfoGroupType"><tt class="docutils literal"><span class="pre">InfoGroupType</span></tt></a></p> </dd> </dl> </li> <li><dl class="element" id="element:Path"> <dt id="element:Path"> <!--[element:Path]--><em>element</em> <strong>Path</strong><a class="headerlink" href="#element:Path" title="Permalink to this definition">¶</a></dt> </dt> <dd><p class="first"></p> <p class="last">Type: <a class="reference internal" href="#complexType:InfoGroupType"><tt class="docutils literal"><span class="pre">InfoGroupType</span></tt></a></p> </dd> </dl> </li> <li><dl class="element" id="element:Info"> <dt id="element:Info"> <!--[element:Info]--><em>element</em> <strong>Info</strong><a class="headerlink" href="#element:Info" title="Permalink to this definition">¶</a></dt> </dt> <dd><p class="first"></p> <dl class="last docutils" id="complexType:InfoType"> <dt>Attributes:</dt> <dd><table border="1" class="first last docutils"> <colgroup> <col width="10%" /> <col width="50%" /> <col width="20%" /> <col width="10%" /> <col width="10%" /> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head"><p class="first last">Name</p> </th> <th class="head"><p class="first last">Description</p> </th> <th class="head"><p class="first last">Values</p> </th> <th class="head"><p class="first last">Required</p> </th> <th class="head"><p class="first last">Default</p> </th> </tr> </thead> <tbody valign="top"> <tr class="row-even"><td><p class="first last"><span class="target" id="attribute:InfoType:encoding"></span><tt class="docutils literal"><span class="pre">encoding</span></tt></p> </td> <td><blockquote class="first last"> <div><p>Encoding of the file for tranfer to the client. Use <tt class="docutils literal"><span class="pre">base64</span></tt> for binary files.</p> </div></blockquote> </td> <td><p class="first last"><a class="reference external" href="http://www.w3.org/TR/xmlschema-2/#token"><tt class="docutils literal"><span class="pre">token</span></tt></a></p> </td> <td><p class="first last">No</p> </td> <td><tt class="first last docutils literal"><span class="pre">ascii</span></tt></td> </tr> <tr class="row-odd"><td><p class="first last"><span class="target" id="attribute:InfoType:group"></span><tt class="docutils literal"><span class="pre">group</span></tt></p> </td> <td><blockquote class="first last"> <div><p>Sets group of the file.</p> </div></blockquote> </td> <td><p class="first last"><a class="reference external" href="http://www.w3.org/TR/xmlschema-2/#token"><tt class="docutils literal"><span class="pre">token</span></tt></a></p> </td> <td><p class="first last">No</p> </td> <td><tt class="first last docutils literal"><span class="pre">root</span></tt></td> </tr> <tr class="row-even"><td><p class="first last"><span class="target" id="attribute:InfoType:important"></span><tt class="docutils literal"><span class="pre">important</span></tt></p> </td> <td><blockquote class="first last"> <div><p>Important entries are installed first during client execution.</p> </div></blockquote> </td> <td><p class="first last"><p><tt class="docutils literal"><span class="pre">true</span></tt> | <tt class="docutils literal"><span class="pre">false</span></tt></p> </p> </td> <td><p class="first last">No</p> </td> <td><tt class="first last docutils literal"><span class="pre">false</span></tt></td> </tr> <tr class="row-odd"><td><p class="first last"><span class="target" id="attribute:InfoType:mode"></span><tt class="docutils literal"><span class="pre">mode</span></tt></p> </td> <td><blockquote class="first last"> <div><p>Sets the mode of the file from the octal value given.</p> </div></blockquote> </td> <td><p class="first last"><a class="reference external" href="http://www.w3.org/TR/xmlschema-2/#string"><tt class="docutils literal"><span class="pre">string</span></tt></a></p> </td> <td><p class="first last">No</p> </td> <td><tt class="first last docutils literal"><span class="pre">0644</span></tt></td> </tr> <tr class="row-even"><td><p class="first last"><span class="target" id="attribute:InfoType:owner"></span><tt class="docutils literal"><span class="pre">owner</span></tt></p> </td> <td><blockquote class="first last"> <div><p>Sets owner of the file.</p> </div></blockquote> </td> <td><p class="first last"><a class="reference external" href="http://www.w3.org/TR/xmlschema-2/#token"><tt class="docutils literal"><span class="pre">token</span></tt></a></p> </td> <td><p class="first last">No</p> </td> <td><tt class="first last docutils literal"><span class="pre">root</span></tt></td> </tr> <tr class="row-odd"><td><p class="first last"><span class="target" id="attribute:InfoType:paranoid"></span><tt class="docutils literal"><span class="pre">paranoid</span></tt></p> </td> <td><blockquote class="first last"> <div><p>If true, files that are replaced will be backed up first.</p> </div></blockquote> </td> <td><p class="first last"><p><tt class="docutils literal"><span class="pre">true</span></tt> | <tt class="docutils literal"><span class="pre">false</span></tt></p> </p> </td> <td><p class="first last">No</p> </td> <td><tt class="first last docutils literal"><span class="pre">true</span></tt></td> </tr> <tr class="row-even"><td><p class="first last"><span class="target" id="attribute:InfoType:secontext"></span><tt class="docutils literal"><span class="pre">secontext</span></tt></p> </td> <td><blockquote class="first last"> <div><p>Sets the SELinux context of the file, or sets to the default context for that path set by policy if set to the special value <tt class="docutils literal"><span class="pre">__default__</span></tt>.</p> </div></blockquote> </td> <td><p class="first last"><a class="reference external" href="http://www.w3.org/TR/xmlschema-2/#token"><tt class="docutils literal"><span class="pre">token</span></tt></a></p> </td> <td><p class="first last">No</p> </td> <td><tt class="first last docutils literal"><span class="pre">__default__</span></tt></td> </tr> <tr class="row-odd"><td><p class="first last"><span class="target" id="attribute:InfoType:sensitive"></span><tt class="docutils literal"><span class="pre">sensitive</span></tt></p> </td> <td><blockquote class="first last"> <div><p>The contents of sensitive entries aren’t included in reports.</p> </div></blockquote> </td> <td><p class="first last"><p><tt class="docutils literal"><span class="pre">true</span></tt> | <tt class="docutils literal"><span class="pre">false</span></tt></p> </p> </td> <td><p class="first last">No</p> </td> <td><tt class="first last docutils literal"><span class="pre">false</span></tt></td> </tr> </tbody> </table> </dd> <dt>Child elements:</dt> <dd><ul class="first last"> <li><dl class="element" id="element:ACL"> <dt id="element:ACL"> <!--[element:ACL]--><em>element</em> <strong>ACL</strong><a class="headerlink" href="#element:ACL" title="Permalink to this definition">¶</a></dt> </dt> <dd><p class="first"></p> <p class="last">Type: <a class="reference internal" href="plugins/generators/rules.html#complexType:ACLType"><tt class="docutils literal"><span class="pre">ACLType</span></tt></a></p> </dd> </dl> </li> </ul> </dd> </dl> </dd> </dl> </li> </ul> </dd> </dl> </dd> </dl> </dd> </dl> <dl class="complexType" id="complexType:InfoGroupType"> <dt id="complexType:InfoGroupType"> <!--[complexType:InfoGroupType]--><em>complexType</em> <strong>InfoGroupType</strong><a class="headerlink" href="#complexType:InfoGroupType" title="Permalink to this definition">¶</a></dt> </dt> <dd><blockquote class="first"> <div>An <strong>InfoGroupType</strong> is a <tt class="docutils literal"><span class="pre">info.xml</span></tt> tag used to provide logic. Child entries of such a tag only apply to machines that match the condition specified – membership in a group, a matching client name, or a matching path for the file being generated. <a class="reference internal" href="#attribute:InfoGroupType:negate"><tt class="xref xml xml-attribute docutils literal"><span class="pre">negate</span></tt></a> can be set to negate the sense of the match.</div></blockquote> <dl class="last docutils"> <dt>Attributes:</dt> <dd><table border="1" class="first last docutils"> <colgroup> <col width="10%" /> <col width="50%" /> <col width="20%" /> <col width="10%" /> <col width="10%" /> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head">Name</th> <th class="head">Description</th> <th class="head">Values</th> <th class="head">Required</th> <th class="head">Default</th> </tr> </thead> <tbody valign="top"> <tr class="row-even"><td><span class="target" id="attribute:InfoGroupType:name"></span><tt class="docutils literal"><span class="pre">name</span></tt></td> <td><blockquote class="first last"> <div>The name of the client or group, or the full path to match on. Child entries will only apply to this client or group (unless <a class="reference internal" href="#attribute:InfoGroupType:negate"><tt class="xref xml xml-attribute docutils literal"><span class="pre">negate</span></tt></a> is set).</div></blockquote> </td> <td><a class="reference external" href="http://www.w3.org/TR/xmlschema-2/#string"><tt class="docutils literal"><span class="pre">string</span></tt></a></td> <td>Yes</td> <td>None</td> </tr> <tr class="row-odd"><td><span class="target" id="attribute:InfoGroupType:negate"></span><tt class="docutils literal"><span class="pre">negate</span></tt></td> <td><blockquote class="first last"> <div>Negate the sense of the match, so that child entries only apply to a client if it is not a member of the given group, does not have the given client name, or the path names do not match.</div></blockquote> </td> <td><tt class="docutils literal"><span class="pre">true</span></tt> | <tt class="docutils literal"><span class="pre">false</span></tt></td> <td>No</td> <td><tt class="first last docutils literal"><span class="pre">false</span></tt></td> </tr> </tbody> </table> </dd> <dt>Child elements:</dt> <dd><ul class="first last simple"> <li><a class="reference internal" href="#element:Info"><tt class="docutils literal"><span class="pre">Info</span></tt></a></li> <li><a class="reference internal" href="#element:Group"><tt class="docutils literal"><span class="pre">Group</span></tt></a></li> <li><a class="reference internal" href="#element:Client"><tt class="docutils literal"><span class="pre">Client</span></tt></a></li> <li><a class="reference internal" href="#element:Path"><tt class="docutils literal"><span class="pre">Path</span></tt></a></li> </ul> </dd> </dl> </dd> </dl> <p>A sample <tt class="docutils literal"><span class="pre">info.xml</span></tt> file for CGI script on a web server might look like:</p> <div class="highlight-xml"><div class="highlight"><pre><span class="nt"><FileInfo></span> <span class="nt"><Info</span> <span class="na">owner=</span><span class="s">"www"</span> <span class="na">group=</span><span class="s">"www"</span> <span class="na">mode=</span><span class="s">"0755"</span><span class="nt">/></span> <span class="nt"></FileInfo></span> </pre></div> </div> <p>A more complex example for a template that generates both <tt class="docutils literal"><span class="pre">bcfg2.conf</span></tt> and <tt class="docutils literal"><span class="pre">bcfg2-web.conf</span></tt> might look like this:</p> <div class="highlight-xml"><div class="highlight"><pre><span class="nt"><FileInfo></span> <span class="nt"><Path</span> <span class="na">name=</span><span class="s">"/etc/bcfg2-web.conf"</span><span class="nt">></span> <span class="nt"><Info</span> <span class="na">owner=</span><span class="s">"root"</span> <span class="na">group=</span><span class="s">"apache"</span> <span class="na">mode=</span><span class="s">"0640"</span><span class="nt">/></span> <span class="nt"></Path></span> <span class="nt"><Path</span> <span class="na">name=</span><span class="s">"/etc/bcfg2-web.conf"</span> <span class="na">negate=</span><span class="s">"true"</span><span class="nt">></span> <span class="nt"><Group</span> <span class="na">name=</span><span class="s">"bcfg2-server"</span><span class="nt">></span> <span class="nt"><Info</span> <span class="na">owner=</span><span class="s">"bcfg2"</span> <span class="na">group=</span><span class="s">"bcfg2"</span> <span class="na">mode=</span><span class="s">"0600"</span><span class="nt">/></span> <span class="nt"></Group></span> <span class="nt"><Group</span> <span class="na">name=</span><span class="s">"bcfg2-server"</span> <span class="na">negate=</span><span class="s">"true"</span><span class="nt">></span> <span class="nt"><Info</span> <span class="na">owner=</span><span class="s">"root"</span> <span class="na">group=</span><span class="s">"root"</span> <span class="na">mode=</span><span class="s">"0600"</span><span class="nt">/></span> <span class="nt"></Group></span> <span class="nt"></Path></span> <span class="nt"></FileInfo></span> </pre></div> </div> <p>See <a class="reference internal" href="selinux.html#server-selinux"><em>SELinux</em></a> for more information on the <tt class="docutils literal"><span class="pre">secontext</span></tt> attribute and managing SELinux in general.</p> <div class="section" id="info-and-info-files"> <h2>:info and info files<a class="headerlink" href="#info-and-info-files" title="Permalink to this headline">¶</a></h2> <p class="deprecated"> <span class="versionmodified">Deprecated since version 1.3.0.</span></p> <p>Historically, Bcfg2 also accepted the use of <tt class="docutils literal"><span class="pre">:info</span></tt> and <tt class="docutils literal"><span class="pre">info</span></tt> files, which function the same as <tt class="docutils literal"><span class="pre">info.xml</span></tt>, but are not XML. They lack the ability to specify different permissions based on client, group, or path, and cannot be used to specify ACLs, either.</p> <p>An example <tt class="docutils literal"><span class="pre">:info</span></tt> or <tt class="docutils literal"><span class="pre">info</span></tt> file would look like:</p> <div class="highlight-python"><pre>owner: www group: www mode: 0755</pre> </div> <p>All attributes allowed on the <tt class="docutils literal"><span class="pre"><Info></span></tt> tag of an <tt class="docutils literal"><span class="pre">info.xml</span></tt> file can be used in an <tt class="docutils literal"><span class="pre">:info</span></tt> or <tt class="docutils literal"><span class="pre">info</span></tt> file.</p> <p>You should not use more than one <tt class="docutils literal"><span class="pre">:info</span></tt>, <tt class="docutils literal"><span class="pre">info</span></tt>, or <tt class="docutils literal"><span class="pre">info.xml</span></tt> file for a single entry.</p> </div> </div> </div> </div> </div> <div class="sphinxsidebar"> <div class="sphinxsidebarwrapper"> <h3><a href="../index.html">Table Of Contents</a></h3> <ul> <li><a class="reference internal" href="#">info.xml</a><ul> <li><a class="reference internal" href="#info-and-info-files">:info and info files</a></li> </ul> </li> </ul> <h4>Previous topic</h4> <p class="topless"><a href="configurationentries.html" title="previous chapter">Configuration Entries</a></p> <h4>Next topic</h4> <p class="topless"><a href="snapshots/index.html" title="next chapter">Bcfg2 Snapshots</a></p> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../_sources/server/info.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="snapshots/index.html" title="Bcfg2 Snapshots" >next</a> |</li> <li class="right" > <a href="configurationentries.html" title="Configuration Entries" >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> </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>