Sophie

Sophie

distrib > Fedora > 17 > i386 > media > updates > by-pkgid > b50d8ee6d7871fcc13c0677a9364ed59 > files > 459

bcfg2-doc-1.3.0-1.fc17.noarch.rpm



<!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>motd &mdash; 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="TGenshi" href="../../tgenshi.html" />
    <link rel="next" title="my.cnf" href="mycnf.html" />
    <link rel="prev" title="iptables" href="iptables.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="mycnf.html" title="my.cnf"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="iptables.html" title="iptables"
             accesskey="P">previous</a> |</li>
	<li><a href="../../../../../index.html">home</a> |&nbsp;</li>
	<!--<li><a href="../../../../../search.html">search</a> |&nbsp;</li>-->
	<li><a href="../../../../../help/index.html">help</a> |&nbsp;</li>
	<li><a href="../../../../../contents.html">documentation </a> &raquo;</li>

          <li><a href="../../../../../contents.html" >Bcfg2 documentation 1.3.0</a> &raquo;</li>
          <li><a href="../../../../index.html" >The Bcfg2 Server</a> &raquo;</li>
          <li><a href="../../../index.html" >Plugins</a> &raquo;</li>
          <li><a href="../../tgenshi.html" accesskey="U">TGenshi</a> &raquo;</li> 
      </ul>
    </div>
  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <div class="section" id="motd">
<h1>motd<a class="headerlink" href="#motd" title="Permalink to this headline">¶</a></h1>
<p>The following template automatically generates a MOTD (message of the
day) file that describes the system in terms of its Bcfg2 metadata
and probe responses.  It conditionally displays groups, categories,
and probe responses, if there exists any data for them.</p>
<div class="section" id="cfg-etc-motd-motd-genshi">
<h2>Cfg/etc/motd/motd.genshi<a class="headerlink" href="#cfg-etc-motd-motd-genshi" title="Permalink to this headline">¶</a></h2>
<div class="highlight-none"><div class="highlight"><pre>------------------------------------------------------------------------
                    GOALS FOR SERVER MANGED BY BCFG2
------------------------------------------------------------------------
Hostname is ${metadata.hostname}

Groups:
{% for group in metadata.groups %}\
 * ${group}
{% end %}\

{% if metadata.categories %}\
Categories:
{% for category in metadata.categories %}\
 * ${category}
{% end %}\
{% end %}\


{% if metadata.Probes %}\
Probes:
{% for probe, value in metadata.Probes.iteritems() %}\
 * ${probe} \
   ${value}
{% end %}\
{% end %}\

-------------------------------------------------------------------------
                        ITOPS MOTD
-------------------------------------------------------------------------
Please create a Ticket for any system level changes you need from IT.
</pre></div>
</div>
<p>This template gets the hostname, groups membership of the host, categories
of the host (if any), and result of probes on the host (if any). The
template formats this in with a header and footer that makes it visually
more appealing.</p>
</div>
<div class="section" id="output">
<h2>Output<a class="headerlink" href="#output" title="Permalink to this headline">¶</a></h2>
<p>One possible output of this template would be the following:</p>
<div class="highlight-python"><pre>------------------------------------------------------------------------
                    GOALS FOR SERVER MANGED BY BCFG2
------------------------------------------------------------------------
Hostname is cobra.example.com

Groups:
 * oracle-server
 * centos5-5.2
 * centos5
 * redhat
 * x86_64
 * sys-vmware

Categories:
 * os-variant
 * os
 * database-server
 * os-version


Probes:
 * arch    x86_64
 * network    intranet_network
 * diskspace    Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                       18G  2.1G   15G  13% /
/dev/sda1              99M   13M   82M  13% /boot
tmpfs                 3.8G     0  3.8G   0% /dev/shm
/dev/mapper/mhcdbo-clear
                      1.5T  198M  1.5T   1% /mnt/san-oracle
 * virtual    vmware

-------------------------------------------------------------------------
                        IT MOTD
-------------------------------------------------------------------------
Please create a Ticket for any system level changes you need from IT.</pre>
</div>
<p>One way to make this even more useful, is to only include the result of
certain probes. It would also be a nice feature to be able to include
customer messages on a host or group level.</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="#">motd</a><ul>
<li><a class="reference internal" href="#cfg-etc-motd-motd-genshi">Cfg/etc/motd/motd.genshi</a></li>
<li><a class="reference internal" href="#output">Output</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="iptables.html"
                        title="previous chapter">iptables</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="mycnf.html"
                        title="next chapter">my.cnf</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="../../../../../_sources/server/plugins/generators/examples/genshi/motd.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="mycnf.html" title="my.cnf"
             >next</a> |</li>
        <li class="right" >
          <a href="iptables.html" title="iptables"
             >previous</a> |</li>
	<li><a href="../../../../../index.html">home</a> |&nbsp;</li>
	<!--<li><a href="../../../../../search.html">search</a> |&nbsp;</li>-->
	<li><a href="../../../../../help/index.html">help</a> |&nbsp;</li>
	<li><a href="../../../../../contents.html">documentation </a> &raquo;</li>

          <li><a href="../../../../../contents.html" >Bcfg2 documentation 1.3.0</a> &raquo;</li>
          <li><a href="../../../../index.html" >The Bcfg2 Server</a> &raquo;</li>
          <li><a href="../../../index.html" >Plugins</a> &raquo;</li>
          <li><a href="../../tgenshi.html" >TGenshi</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; 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>