From baf2a05708e21a47533e79db953fc20414755bd4 Mon Sep 17 00:00:00 2001 From: Tim Bielawa Date: Wed, 7 Mar 2012 12:41:53 -0500 Subject: [PATCH] Polish the docs up some more. Also make 'index.html' forward to the actual html output --- build-site.py | 8 +- css/screen.css | 197 ---- css/syntax.css | 61 -- html/_modules/index.html | 95 -- html/_modules/taboot/output.html | 618 ----------- html/_modules/taboot/runner.html | 369 ------- html/_modules/taboot/tasks.html | 263 ----- html/_modules/taboot/tasks/command.html | 129 --- html/_modules/taboot/tasks/mod_jk.html | 190 ---- html/_modules/taboot/tasks/nagios.html | 284 ----- html/_modules/taboot/tasks/poller.html | 149 --- html/_modules/taboot/tasks/puppet.html | 196 ---- html/_modules/taboot/tasks/rpm.html | 189 ---- html/_modules/taboot/tasks/service.html | 149 --- html/_modules/taboot/tasks/sleep.html | 181 ---- html/_modules/taboot/tasks/yum.html | 166 --- html/_sources/code.txt | 78 -- html/_sources/development.txt | 98 -- html/_sources/index.txt | 65 +- html/_sources/install.txt | 56 - html/_sources/man.txt | 17 +- html/_sources/tasks.txt | 16 - html/api.html | 10 +- html/code.html | 853 --------------- html/communicate.html | 10 +- html/development.html | 216 ---- html/examples.html | 20 +- html/index.html | 81 +- html/install.html | 158 --- html/man.html | 37 +- html/man/ansible-modules.5.html | 2 +- html/man/ansible-playbook.5.html | 2 +- html/man/ansible.1.html | 2 +- html/playbooks.html | 10 +- html/py-modindex.html | 169 --- html/searchindex.js | 2 +- html/tasks.html | 1304 ----------------------- index.html | 27 +- rst/index.rst | 65 +- rst/man.rst | 17 +- 40 files changed, 257 insertions(+), 6302 deletions(-) delete mode 100644 css/screen.css delete mode 100644 css/syntax.css delete mode 100644 html/_modules/index.html delete mode 100644 html/_modules/taboot/output.html delete mode 100644 html/_modules/taboot/runner.html delete mode 100644 html/_modules/taboot/tasks.html delete mode 100644 html/_modules/taboot/tasks/command.html delete mode 100644 html/_modules/taboot/tasks/mod_jk.html delete mode 100644 html/_modules/taboot/tasks/nagios.html delete mode 100644 html/_modules/taboot/tasks/poller.html delete mode 100644 html/_modules/taboot/tasks/puppet.html delete mode 100644 html/_modules/taboot/tasks/rpm.html delete mode 100644 html/_modules/taboot/tasks/service.html delete mode 100644 html/_modules/taboot/tasks/sleep.html delete mode 100644 html/_modules/taboot/tasks/yum.html delete mode 100644 html/_sources/code.txt delete mode 100644 html/_sources/development.txt delete mode 100644 html/_sources/install.txt delete mode 100644 html/_sources/tasks.txt delete mode 100644 html/code.html delete mode 100644 html/development.html delete mode 100644 html/install.html delete mode 100644 html/py-modindex.html delete mode 100644 html/tasks.html diff --git a/build-site.py b/build-site.py index 25c5d22807e..6e134c2abd4 100755 --- a/build-site.py +++ b/build-site.py @@ -71,6 +71,8 @@ class SphinxBuilder(object): print >> sys.stderr, "are required to make documentation:" print >> sys.stderr, "\tsphinx.application.Sphinx" print >> sys.stderr, "This is usually available from the python-sphinx package" + print >> sys.stderr, "=== Error message received while attempting to build===" + print >> sys.stderr, ie except Exception, ex: print >> sys.stderr, "FAIL! exiting ... (%s)" % ex @@ -80,4 +82,8 @@ class SphinxBuilder(object): if __name__ == '__main__': docgen = SphinxBuilder() -# docgen.build_docs() + + if "view" in sys.argv: + import webbrowser + if not webbrowser.open('html/index.html'): + print >> sys.stderr, "Could not open on your webbrowser." diff --git a/css/screen.css b/css/screen.css deleted file mode 100644 index 4574ea79c5c..00000000000 --- a/css/screen.css +++ /dev/null @@ -1,197 +0,0 @@ -/*****************************************************************************/ -/* -/* Common -/* -/*****************************************************************************/ - -/* Global Reset */ - -* { - margin: 0; - padding: 0; -} - -html, body { - height: 100%; -} - -body { - background-color: white; - font: 13.34px helvetica, arial, clean, sans-serif; - *font-size: small; - text-align: center; -} - -h1, h2, h3, h4, h5, h6 { - font-size: 100%; -} - -h1 { - margin-bottom: 1em; -} - -p { - margin: 1em 0; -} - -a { - color: #00a; -} - -a:hover { - color: black; -} - -a:visited { - color: #a0a; -} - -table { - font-size: inherit; - font: 100%; -} - -/*****************************************************************************/ -/* -/* Home -/* -/*****************************************************************************/ - -ul.posts { - list-style-type: none; - margin-bottom: 2em; -} - - ul.posts li { - line-height: 1.75em; - } - - ul.posts span { - color: #aaa; - font-family: Monaco, "Courier New", monospace; - font-size: 80%; - } - -/*****************************************************************************/ -/* -/* Site -/* -/*****************************************************************************/ - -.site { - font-size: 110%; - text-align: justify; - width: 40em; - margin: 3em auto 2em auto; - line-height: 1.5em; -} - -.title { - color: #a00; - font-weight: bold; - margin-bottom: 2em; -} - - .site .title a { - color: #a00; - text-decoration: none; - } - - .site .title a:hover { - color: black; - } - - .site .title a.extra { - color: #aaa; - text-decoration: none; - margin-left: 1em; - } - - .site .title a.extra:hover { - color: black; - } - - .site .meta { - color: #aaa; - } - - .site .footer { - font-size: 80%; - color: #666; - border-top: 4px solid #eee; - margin-top: 2em; - overflow: hidden; - } - - .site .footer .contact { - float: left; - margin-right: 3em; - } - - .site .footer .contact a { - color: #8085C1; - } - - .site .footer .rss { - margin-top: 1.1em; - margin-right: -.2em; - float: right; - } - - .site .footer .rss img { - border: 0; - } - -/*****************************************************************************/ -/* -/* Posts -/* -/*****************************************************************************/ - -#post { - -} - - /* standard */ - - #post pre { - border: 1px solid #ddd; - background-color: #eef; - padding: 0 .4em; - } - - #post ul, - #post ol { - margin-left: 1.35em; - } - - #post code { - border: 1px solid #ddd; - background-color: #eef; - font-size: 85%; - padding: 0 .2em; - } - - #post pre code { - border: none; - } - - /* terminal */ - - #post pre.terminal { - border: 1px solid black; - background-color: #333; - color: white; - } - - #post pre.terminal code { - background-color: #333; - } - -#related { - margin-top: 2em; -} - - #related h2 { - margin-bottom: 1em; - } diff --git a/css/syntax.css b/css/syntax.css deleted file mode 100644 index e98afc152f9..00000000000 --- a/css/syntax.css +++ /dev/null @@ -1,61 +0,0 @@ -.highlight { background: #ffffff; } -.highlight .c { color: #999988; font-style: italic } /* Comment */ -.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ -.highlight .k { font-weight: bold } /* Keyword */ -.highlight .o { font-weight: bold } /* Operator */ -.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */ -.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */ -.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */ -.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */ -.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ -.highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */ -.highlight .ge { font-style: italic } /* Generic.Emph */ -.highlight .gr { color: #aa0000 } /* Generic.Error */ -.highlight .gh { color: #999999 } /* Generic.Heading */ -.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ -.highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */ -.highlight .go { color: #888888 } /* Generic.Output */ -.highlight .gp { color: #555555 } /* Generic.Prompt */ -.highlight .gs { font-weight: bold } /* Generic.Strong */ -.highlight .gu { color: #aaaaaa } /* Generic.Subheading */ -.highlight .gt { color: #aa0000 } /* Generic.Traceback */ -.highlight .kc { font-weight: bold } /* Keyword.Constant */ -.highlight .kd { font-weight: bold } /* Keyword.Declaration */ -.highlight .kp { font-weight: bold } /* Keyword.Pseudo */ -.highlight .kr { font-weight: bold } /* Keyword.Reserved */ -.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */ -.highlight .m { color: #009999 } /* Literal.Number */ -.highlight .s { color: #d14 } /* Literal.String */ -.highlight .na { color: #008080 } /* Name.Attribute */ -.highlight .nb { color: #0086B3 } /* Name.Builtin */ -.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */ -.highlight .no { color: #008080 } /* Name.Constant */ -.highlight .ni { color: #800080 } /* Name.Entity */ -.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */ -.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */ -.highlight .nn { color: #555555 } /* Name.Namespace */ -.highlight .nt { color: #000080 } /* Name.Tag */ -.highlight .nv { color: #008080 } /* Name.Variable */ -.highlight .ow { font-weight: bold } /* Operator.Word */ -.highlight .w { color: #bbbbbb } /* Text.Whitespace */ -.highlight .mf { color: #009999 } /* Literal.Number.Float */ -.highlight .mh { color: #009999 } /* Literal.Number.Hex */ -.highlight .mi { color: #009999 } /* Literal.Number.Integer */ -.highlight .mo { color: #009999 } /* Literal.Number.Oct */ -.highlight .sb { color: #d14 } /* Literal.String.Backtick */ -.highlight .sc { color: #d14 } /* Literal.String.Char */ -.highlight .sd { color: #d14 } /* Literal.String.Doc */ -.highlight .s2 { color: #d14 } /* Literal.String.Double */ -.highlight .se { color: #d14 } /* Literal.String.Escape */ -.highlight .sh { color: #d14 } /* Literal.String.Heredoc */ -.highlight .si { color: #d14 } /* Literal.String.Interpol */ -.highlight .sx { color: #d14 } /* Literal.String.Other */ -.highlight .sr { color: #009926 } /* Literal.String.Regex */ -.highlight .s1 { color: #d14 } /* Literal.String.Single */ -.highlight .ss { color: #990073 } /* Literal.String.Symbol */ -.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */ -.highlight .vc { color: #008080 } /* Name.Variable.Class */ -.highlight .vg { color: #008080 } /* Name.Variable.Global */ -.highlight .vi { color: #008080 } /* Name.Variable.Instance */ -.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */ - diff --git a/html/_modules/index.html b/html/_modules/index.html deleted file mode 100644 index b75db85e085..00000000000 --- a/html/_modules/index.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - - - - Overview: module code — Taboot v0.4.0 documentation - - - - - - - - - - - -
- -
-
- - -
-
-
-
- - - - \ No newline at end of file diff --git a/html/_modules/taboot/output.html b/html/_modules/taboot/output.html deleted file mode 100644 index 01fd043c44e..00000000000 --- a/html/_modules/taboot/output.html +++ /dev/null @@ -1,618 +0,0 @@ - - - - - - - - - taboot.output — Taboot v0.4.0 documentation - - - - - - - - - - - - -
-
-
-
- -

Source code for taboot.output

-# -*- coding: utf-8 -*-
-# Taboot - Client utility for performing deployments with Func.
-# Copyright © 2009,2011, Red Hat, Inc.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-from taboot.tasks.puppet import PuppetTaskResult
-from taboot.tasks.rpm import RPMTaskResult
-import re
-
-
-class _FileLikeOutputObject(object):
-    """
-    A file-like parent class.
-    """
-
-    import exceptions
-    import time as _time
-    defaults = None
-    starttime = None
-
-    def __init__(self, *args, **kwargs):
-        """
-        Creates an instance of a file-like object.
-
-        :Parameters:
-           - `args`: all non-keyword arguments.
-           - `kwargs`: all keyword arguments.
-        """
-        import ConfigParser
-        import os.path
-
-        if _FileLikeOutputObject.defaults is None:
-            if os.path.expanduser("~/.taboot.conf"):
-                _FileLikeOutputObject.defaults = ConfigParser.ConfigParser()
-                _FileLikeOutputObject.defaults.read(
-                    os.path.expanduser("~/.taboot.conf"))
-
-        # Only set the start time once, not for each logger instance
-        if _FileLikeOutputObject.starttime is None:
-            import datetime
-            _FileLikeOutputObject.starttime = datetime.datetime.today()
-
-        self._pos = 0L
-        self._closed = False
-        self._setup(*args, **kwargs)
-
-    def _setup(self, *args, **kwargs):
-        """
-        Implementation specific setup.
-
-        :Parameters:
-           - `args`: all non-keyword arguments.
-           - `kwargs`: all keyword arguments.
-        """
-        pass
-
-    def flush(self):
-        """
-        We are not buffering so we always just return None.
-        """
-        return None
-
-    def read(self, *args, **kwargs):
-        """
-        We are an output only file-like object. Raise exception.
-
-        :Parameters:
-           - `args`: all non-keyword arguments.
-           - `kwargs`: all keyword arguments.
-        """
-        raise self.exceptions.NotImplementedError('Object for output only.')
-
-    def tell(self):
-        """
-        Returns the position of the file-like object.
-        """
-        return self._pos
-
-    def truncate(self, size):
-        """
-        We are an output only file-like object. Raise exception.
-
-        :Parameters:
-           - `size`: size to truncate to.
-        """
-        raise self.exceptions.NotImplementedError(
-            'This does not support truncate.')
-
-    def writelines(self, sequence):
-        """
-        Writes a sequence of lines.
-
-        :Parameters:
-           - `sequence`: iterable sequence of data to write.
-        """
-        for item in sequence:
-            self.write(item)
-
-    def write(self, item):
-        """
-        Writer wrapper (not rapper, beav). Simply calls _write which is
-        implementation specific and updates the position.
-
-        :Parameters:
-           - `item`: the item to write.
-        """
-        self._write(item)
-        self._pos += 1
-
-    def _write(self, item):
-        """
-        Implementation of writing data.
-
-        :Parameters:
-           - `item`: the item to write.
-        """
-        raise self.exceptions.NotImplementedError(
-            '_write must be overriden.')
-
-    def close(self):
-        """
-        Close wrapper (again, not rapper, beav). Simply calls _close  which
-        is implementation specific and updates the closed property.
-        """
-        self._close()
-        self._closed = True
-
-    def _close(self):
-        """
-        Implementation of closing the file-like object.
-        By default nothing occurs.
-        """
-        pass
-
-    # Read aliases
-    readline = read
-    readlines = read
-    xreadlines = read
-    seek = read
-
-    # Read-only Properties
-    closed = property(lambda self: self._closed)
-    timestamp = property(lambda self: self._time.strftime(
-            "%Y-%m-%d %H:%M:%S", self._time.localtime()))
-
-
-
[docs]class CLIOutput(_FileLikeOutputObject): - """ - Output a :class:`taboot.tasks.TaskResult` to the command line - with pretty formatting and colors. - """ - - def _setup(self, host, task): - """ - Implementation specific setup for outputting to the CLI. - - :Parameters: - - `host`: name of the host - - `task`: name of the task - """ - import Colors - import sys - self._c = Colors.Colors() - self._sys = sys - self._sys.stdout.write('%s:\n' % ( - self._c.format_string(host, 'blue'))) - self._sys.stdout.write('%s Starting Task[%s]\n' % ( - self.timestamp, self._c.format_string(task, 'white'))) - - def _write(self, result): - """ - Implementation of writing to the CLI. - - :Parameters: - - `result`: result object to inspect and write - """ - import types - - # Set output color - output_color = 'red' - if result.success: - output_color = 'green' - - self._sys.stdout.write("%s:\n" % ( - self._c.format_string(result.host, 'blue'))) - self._sys.stdout.write("%s Finished Task[%s]:\n" % ( - self.timestamp, self._c.format_string( - result.task, output_color))) - - if isinstance(result, PuppetTaskResult): - # If result is an instance of PuppetTaskResult, - # colorize the puppet output - lines = result.output.splitlines() - for line in lines: - if re.match('info:', line): - self._sys.stdout.write("%s\n" % self._c.format_string( - line.strip(), 'green')) - elif re.match('notice:', line): - self._sys.stdout.write("%s\n" % self._c.format_string( - line.strip(), 'blue')) - elif re.match('warning:', line): - self._sys.stdout.write("%s\n" % self._c.format_string( - line.strip(), 'yellow')) - elif re.match('err:', line): - self._sys.stdout.write("%s\n" % self._c.format_string( - line.strip(), 'red')) - else: - self._sys.stdout.write("%s\n" % self._c.format_string( - line.strip(), 'normal')) - elif isinstance(result, RPMTaskResult): - # If result is an instance of RPMTaskResult, - # colorize the rpm.PostManifest output - lines = result.output.splitlines() - for line in lines: - if line.startswith('-'): - self._sys.stdout.write("%s\n" % self._c.format_string( - line.strip(), 'red')) - elif line.startswith('+'): - self._sys.stdout.write("%s\n" % self._c.format_string( - line.strip(), 'green')) - else: - self._sys.stdout.write("%s\n" % self._c.format_string( - line.strip(), 'normal')) - else: - # Use standard pass/fall coloring for output - if isinstance(result.output, types.ListType): - for r in result.output: - self._sys.stdout.write("%s\n" % self._c.format_string( - r.strip(), output_color)) - else: - self._sys.stdout.write("%s\n" % self._c.format_string( - result.output.strip(), output_color)) - -
-
[docs]class LogOutput(_FileLikeOutputObject): - """ - Output a :class:`taboot.tasks.TaskResult` to a logfile. - """ - - def _setup(self, host, task, logfile='taboot.log'): - """ - Implementation specific setup for outputting to a log. - - :Parameters: - - `logfile`: name of the logfile to write to. - """ - self._logfile = logfile - if self._logfile in ('-', 'stdout', '1'): - import sys - self._log_fd = sys.stdout - else: - self._log_fd = open(logfile, 'a') - self._log_fd.write('%s:\n%s Starting Task[%s]\n\n' % ( - host, self.timestamp, task)) - - def _write(self, result): - """ - Implementation of writing to a log. - - :Parameters: - - `result`: result object to inspect and write - """ - import types - - if result.success: - success_str = 'OK' - else: - success_str = 'FAIL' - - self._log_fd.write("%s:\n%s Finished Task[%s]: %s\n" % ( - result.host, self.timestamp, result.task, success_str)) - - if isinstance(result.output, types.ListType): - for r in result.output: - self._log_fd.write("%s\n\n" % r.strip()) - else: - self._log_fd.write("%s\n\n" % result.output.strip()) - -
-
[docs]class EmailOutput(_FileLikeOutputObject): - """ - Output a :class:`taboot.tasks.TaskResult` to a logfile. - """ - - def _setup(self, to_addr, from_addr='taboot@redhat.com'): - """ - Implementation specific setup for outputting to a log. - - :Parameters: - - `to_addr`: who to send the email to. - - `from_addr`: who the email is from. - """ - try: - import cStringIO as StringIO - except ImportError, ie: - import StringIO - self._to_addr = to_addr - self._from_addr = from_addr - self._buffer = StringIO.StringIO() - - def _write(self, result): - """ - Implementation of writing out to an email. - - :Parameters: - - `result`: result object to inspect and write - """ - if result.success: - success_str = 'OK' - else: - success_str = 'FAIL' - - self._buffer.write("%s: %s" % (task_result.task, success_str)) - -
[docs] def flush(self): - """ - Flushing sends the email with the buffer. - """ - import smtplib - from email.mime.text import MIMEText - - self._buffer.flush() - msg = self.MIMEText(self._buffer.read()) - msg['Subject'] = task_result.host - msg['From'] = self._from_addr - msg['To'] = self._to_addr - - smtp = self.smtplib.SMTP() - smtp.connect() - smtp.sendmail(self._from_addr, [self._to_addr], msg.as_string()) - smtp.close() -
- def __del__(self): - """ - If the buffer is not empty before destroying, flush. - """ - if self._buffer.pos < self._buffer.len: - self.flush() - -
-
[docs]class HTMLOutput(_FileLikeOutputObject): - """ - Output a :class:`taboot.tasks.TaskResult` to the command line - with pretty formatting and colors. - - .. document private functions - .. automethod:: _write - """ - - logfile_path = None - - def _expand_starttime(self, param): - """ - Expand any instances of "%s" in `param` - """ - if '%s' in param: - p = param % HTMLOutput.starttime - return p.replace(" ", "-") - else: - return param - - def _setup(self, host, task, logfile="taboot-%s.html", destdir="."): - """ - Implementation specific setup for outputting to an HTML file. - - :Parameters: - - `host`: name of the host - - `task`: name of the task - - `logfile`: name of the file to log to, '%s' is substituted - with a datestamp - - `destdir`: directory in which to save the log file to - """ - import Colors - import sys - import os.path - import os - - _default_logfile = "taboot-%s.html" - _default_destdir = "." - - # Pick if the parameter is changed - # Pick if above is false and logfile is set in defaults - # Else, use parameter - if not logfile == _default_logfile: - _logfile = logfile - elif HTMLOutput.defaults is not None and \ - HTMLOutput.defaults.has_option("HTMLOutput", "logfile"): - _logfile = HTMLOutput.defaults.get("HTMLOutput", "logfile") - else: - _logfile = logfile - - # Expand %s into a time stamp if necessary - _logfile = self._expand_starttime(_logfile) - - if not destdir == _default_destdir: - _destdir = destdir - elif HTMLOutput.defaults is not None and \ - HTMLOutput.defaults.has_option("HTMLOutput", "destdir"): - _destdir = HTMLOutput.defaults.get("HTMLOutput", "destdir") - else: - _destdir = destdir - - # Figured it all out, now we join them together! - self._logfile_path = os.path.join(_destdir, _logfile) - if not os.path.exists(_destdir): - os.makedirs(_destdir, 0755) - - self._c = Colors.HTMLColors() - self._log_fd = open(self._logfile_path, 'a') - - # Lets only print this when it is set or changed - if HTMLOutput.logfile_path is None or \ - not HTMLOutput.logfile_path == self._logfile_path: - sys.stderr.write("Logging HTML Output to %s\n" % \ - self._logfile_path) - HTMLOutput.logfile_path = self._logfile_path - sys.stderr.flush() - - # Log the start of this task - name = self._fmt_anchor(self._fmt_hostname(host)) - start_msg = """<p><tt>%s:</tt></p> -<p><tt>%s Starting Task[%s]\n</tt>""" % (name, self.timestamp, task) - self._log_fd.write(start_msg) - self._log_fd.flush() - - def _fmt_anchor(self, text): - """ - Format an #anchor and a clickable link to it - """ - h = hash(self.timestamp) - anchor_str = "<a name='%s' href='#%s'>%s</a>" % (h, h, text) - return anchor_str - - def _fmt_hostname(self, n): - """ - Standardize the hostname formatting - """ - return "<b>%s</b>" % self._c.format_string(n, 'blue') - -
[docs] def _write(self, result): - """ - Write a tasks `result` out to HTML. Handles enhanced stylizing - for task results that support such as: - - - :py:mod:`taboot.tasks.puppet.PuppetTaskResult` - - :py:mod:`taboot.tasks.rpm.RPMTaskResult` - """ - import types - import sys - import cgi - - name = self._fmt_hostname(result.host) - - # escape any html in result.output - result.output = cgi.escape(result.output) - - if result.success: - success_str = self._c.format_string('<b>OK</b>', 'green') - else: - success_str = self._c.format_string('<b>FAIL</b>', 'red') - - self._log_fd.write("<p><tt>%s:\n</tt></p>\n<p><tt>%s "\ - "Finished Task[%s]: %s</tt></p>\n" % - (name, self.timestamp, result.task, success_str)) - - if isinstance(result, PuppetTaskResult): - # If result is an instance of PuppetTaskResult, - # colorize the puppet output - lines = result.output.splitlines() - for line in lines: - if re.match('info:', line): - self._log_fd.write("%s<br />\n" % - self._c.format_string(line.strip(), - 'green')) - elif re.match('notice:', line): - self._log_fd.write("%s<br />\n" % - self._c.format_string(line.strip(), - 'blue')) - elif re.match('warning:', line): - self._log_fd.write("%s<br />\n" % - self._c.format_string(line.strip(), - 'yellow')) - elif re.match('err:', line): - self._log_fd.write("%s<br />\n" % - self._c.format_string(line.strip(), - 'red')) - else: - self._log_fd.write("%s<br />\n" % - self._c.format_string(line.strip(), - 'normal')) - self._log_fd.write("<br /><br />\n") - elif isinstance(result, RPMTaskResult): - # If result is an instance of RPMTaskResult, - # colorize the rpm.PostManifest output - lines = result.output.splitlines() - for line in lines: - if line.startswith('-'): - self._log_fd.write("%s<br />\n" % - self._c.format_string(line.strip(), - 'red')) - elif line.startswith('+'): - self._log_fd.write("%s<br />\n" % - self._c.format_string(line.strip(), - 'green')) - else: - self._log_fd.write("%s<br />\n" % - self._c.format_string(line.strip(), - 'normal')) - self._log_fd.write("<br /><br />\n") - else: - # Use standard pass/fall coloring for output - if isinstance(result.output, types.ListType): - for r in result.output: - self._log_fd.write("<pre>%s</pre>\n<br /><br />\n" % - r.strip()) - else: - self._log_fd.write("<pre>%s</pre>\n<br /><br />\n" % - result.output.strip()) - - self._log_fd.flush()
-
- -
-
-
-
-
- - -
-
-
-
- - - - \ No newline at end of file diff --git a/html/_modules/taboot/runner.html b/html/_modules/taboot/runner.html deleted file mode 100644 index 1cf85daf48d..00000000000 --- a/html/_modules/taboot/runner.html +++ /dev/null @@ -1,369 +0,0 @@ - - - - - - - - - taboot.runner — Taboot v0.4.0 documentation - - - - - - - - - - - - -
-
-
-
- -

Source code for taboot.runner

-# -*- coding: utf-8 -*-
-# Taboot - Client utility for performing deployments with Func.
-# Copyright © 2009-2011, Red Hat, Inc.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-import threading
-from taboot.util import instantiator
-from log import *
-
-
-
[docs]class Runner(object): - """ - The Runner, responsible for running a taboot job. - """ - - import threading - import taboot.output - - def __init__(self, script, config, expand_globs=True): - """ - :Parameters: - - `script`: an instance of tabootScript - - - `expand_globs`: whether to expand the globs or just leave - them as is. - """ - self._config = config - self._hosts = script.getHosts() - self._tasks = script.getTaskTypes() - self._output = script.getOutputTypes() - self._task_q = [] - self._fail_event = self.threading.Event() - - if expand_globs: - self._hosts = self._expand_globs() - log_debug("Will operate on %s host(s).", len(self._hosts)) - - # Prefight threading - self._preflight_tasks = script.getPreflightTypes() - self._preflight_semaphore = self.threading.Semaphore( - len(self._hosts)) - self._preflight_tasks_q = [] - - # Main task-body threading - if script.getConcurrency() == "all": - self._concurrency = len(self._hosts) - else: - self._concurrency = int(script.getConcurrency()) - log_debug("Setting task-body concurrency to %s.", - self._concurrency) - self._semaphore = self.threading.Semaphore(self._concurrency) - - def _run_preflight(self): - """ - Run the jobs in a prefilght section. - """ - import signal - - rdy_msg = "\nPre-Flight complete, press enter to continue: " - - for host in self._hosts: - t = TaskRunner(host, self._preflight_tasks, - self._preflight_semaphore, - self._output, self._fail_event) - t.start() - self._preflight_tasks_q.append(t) - - signal.signal(signal.SIGINT, self.__sighandler) - - for task in self._task_q: - while task.isAlive(): - task.join(0.1) - - while len(self.threading.enumerate()) > 1: - # Even though all the threads may have been joined we - # should still wait for them to terminate. If we don't - # wait for that we will likely see the 'continue?' prompt - # before the preflight output gets a chance to print. - pass - - if not self._config["onlypreflight"]: - ready = raw_input(rdy_msg) - - if self._fail_event.isSet(): - return False - return True - - def _run_tasks(self): - """ - Run a task body. - """ - import signal - - for host in self._hosts: - t = TaskRunner(host, self._tasks, self._semaphore, self._output, - self._fail_event) - t.start() - self._task_q.append(t) - - signal.signal(signal.SIGINT, self.__sighandler) - - for task in self._task_q: - while task.isAlive(): - task.join(0.1) - - if self._fail_event.isSet(): - return False - return True - -
[docs] def run(self): - """ - Run the preflight/tasks-body - """ - - if len(self._preflight_tasks) > 0: - if not self._run_preflight(): - return False - - if self._config["onlypreflight"]: - return True - else: - return self._run_tasks() -
- def _expand_globs(self): - """ - Returns the hosts that expand out from globs. - - This is kind of a dirty hack around how Func returns minions - in an arbitrary order. - """ - - import func.overlord.client as fc - - if not self._hosts: - return [] - if isinstance(self._hosts, basestring): - glob = self._hosts - c = fc.Client(glob) - return c.list_minions() - else: - # Iterate over each given item, expand it, and then push - # it onto our list. But only if it doesn't exist already! - found_hosts = [] - for h in self._hosts: - c = fc.Client(h) - new_hosts = filter(lambda h: h not in found_hosts, - c.list_minions()) - found_hosts.extend(new_hosts) - # for found_host in c.list_minions(): - # h = filter - # if not found_host in found_hosts: - # found_hosts.append(found_host) - return found_hosts - - def __sighandler(self, signal, frame): - """ - If we get SIGINT on the CLI, we need to quit all the threads - in our process group - """ - import os - import signal - - os.killpg(os.getpgid(0), signal.SIGQUIT) - -
-
[docs]class TaskRunner(threading.Thread): - """ - TaskRunner is responsible for executing a set of tasks for a - single host in it's own thread. - """ - - from taboot.tasks import TaskResult as _TaskResult - - def __init__(self, host, tasks, semaphore, output, fail_event): - """ - :Parameters: - - `host`: The host to operate on. - - `tasks`: A list of tasks to perform (see :class:`Runner`) - - `semaphore`: The :class:`Runner` semaphore to acquire before - executing - - `output`: A list of outputters to use. (see :class:`Runner`) - - `fail_event`: The :class:`Runner` failure event to check before - executing. If this event is set when the TaskRunner acquires the - semaphore, then the TaskRunner is effectively a no-op. - """ - - threading.Thread.__init__(self) - self._host = host - self._tasks = tasks - self._semaphore = semaphore - self._output = output - self._fail_event = fail_event - self._state = {} - - def __getitem__(self, key): - return self._state[key] - - def __setitem__(self, key, value): - self._state[key] = value - -
[docs] def run(self): - """ - Run the task(s) for the given host. If the fail_event passed - from the invoking :class:`Runner` is set, do nothing. - """ - - self._semaphore.acquire() - - if self._fail_event.isSet(): - # some other host has bombed - self._semaphore.release() - return - - try: - host_success = True - for task in self._tasks: - result = self.run_task(task) - if not result.success and not result.ignore_errors: - host_success = False - break - except: - self._bail_failure() - raise - - if not host_success: - self._bail_failure() - else: - self._semaphore.release() - return host_success -
- def _bail_failure(self): - """ - Die nicely :) - """ - - self._fail_event.set() - self._semaphore.release() - -
[docs] def run_task(self, task): - """ - Run a single task. Sets task.host and then invokes the run - method for the task. - - :Parameters: - - `task`: The task to run - """ - - ignore_errors = False - if 'ignore_errors' in task: - if task['ignore_errors'] in ('True', 'true', 1): - ignore_errors = True - - task = instantiator(task, 'taboot.tasks', host=self._host) - - outputters = [] - for o in self._output: - instance = instantiator(o, 'taboot.output', - host=self._host, - task=task) - outputters.append(instance) - - try: - result = task.run(self) - except Exception, e: - result = self._TaskResult(task, output=repr(e)) - - for o in outputters: - o.write(result) - - result.ignore_errors = ignore_errors - return result
-
- -
-
-
-
-
- - -
-
-
-
- - - - \ No newline at end of file diff --git a/html/_modules/taboot/tasks.html b/html/_modules/taboot/tasks.html deleted file mode 100644 index 0f45d649c39..00000000000 --- a/html/_modules/taboot/tasks.html +++ /dev/null @@ -1,263 +0,0 @@ - - - - - - - - - taboot.tasks — Taboot v0.4.0 documentation - - - - - - - - - - - - -
-
-
-
- -

Source code for taboot.tasks

-# -*- coding: utf-8 -*-
-# Taboot - Client utility for performing deployments with Func.
-# Copyright © 2009-2011, Red Hat, Inc.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-
-
[docs]class BaseTask(object): - """ - Base Task. All tasks should inherit from this. It does the - pretty string representation of a task and allows setting of the - host attribute. - """ - - def __init__(self, *args, **kwargs): - self._name = str(type(self)) - next = self._name.index("'") + 1 - self._name = self._name[next:self._name.rindex("'")] - self._args = args - self.host = kwargs['host'] - self.concurrentFriendly = True - - def __repr__(self): - return "%s%s" % (self._name, self._args) - - def _sethost(self, host): - self._host = host - - def _gethost(self): - if hasattr(self, '_host'): - return self._host - else: - return None - - host = property(_gethost, _sethost) - -
-
[docs]class FuncTask(BaseTask): - """ - A Func-based task. All tasks that utilize Func should inherit - from this. - """ - - import func.jobthing - from taboot.errors import FuncException as _FuncException - - def _func_run(self, func_command, *args): - """ - Execute a command via Func. - - :Paramaters: - - `func_command` String representing func command to run - (e.g. 'command.run') - - `*args` Argument(s) to be used when invoking the func command - """ - - import time - import func.overlord.client - try: - client = func.overlord.client.Client(self._host, async=True) - job_id = reduce(lambda x, y: getattr(x, y), - func_command.split('.'), - client)(*args) - # poll until the job completes - (status, result) = (None, None) - while status != self.func.jobthing.JOB_ID_FINISHED: - (status, result) = client.job_status(job_id) - time.sleep(1) - result = result[self._host] - if result[0] == 'REMOTE_ERROR': - raise self._FuncException(result[1:]) - return (True, result) - except Exception, ex: - return (False, repr(ex)) - -
[docs] def run(self, runner): - """ - Run the FuncTask. - - :Parameters: - - `runner` A :class:`taboot.runner.TaskRunner` instance - """ - - if not hasattr(self, '_command'): - raise Exception("You MUST set self._command when instantiating " + - "a subclass of FuncTask!") - - result = self._func_run(self._command, *(self._args)) - - if result[0]: - # command executed successfully as far as "func success" - return self._process_result(result[1]) - else: - return TaskResult(self, success=False, output=result[1]) - -
-
[docs]class FuncErrorTask(FuncTask): - """ - Explicitly cause a func remote error by calling a bad command. - Used to verify func exception handling works as expected - """ - - def __init__(self, *args, **kwargs): - super(FuncErrorTask, self).__init__(*args, **kwargs) - self._command = 'thiscommand.DoesntExist' - -
-
[docs]class TaskResult(object): - """ - An encapsulation of the results of a task. This is passed to one - or more instances of output classes (derived from BaseOutput) in - order to display to the user. - """ - - def __init__(self, task, success=False, output='', ignore_errors=False): - """ - :Parameters: - - `task`: The task object represented by this result - - `success`: Whether the task completed successfully or not - - `output`: Any text output produced by the task - """ - - if hasattr(task, 'host'): - self._host = task.host - self._task = repr(task) - self._taskObj = task - self._success = success - self._output = output - self._ignore_errors = ignore_errors - - def _gettask(self): - return self._task - - def _gettaskObj(self): - return self._taskObj - - def _settask(self, t): - self._task = repr(t) - - def _getsuccess(self): - return self._success - - def _setsuccess(self, success): - self._success = success - - def _getoutput(self): - return self._output - - def _setoutput(self, output): - self._output = output - - def _getignore_errors(self): - return self._ignore_errors - - def _setignore_errors(self, ignore_errors): - self._ignore_errors = ignore_errors - - def _gethost(self): - return self._host - - task = property(_gettask, _settask) - success = property(_getsuccess, _setsuccess) - output = property(_getoutput, _setoutput) - ignore_errors = property(_getignore_errors, _setignore_errors) - host = property(_gethost) - taskObj = property(_gettaskObj)
-
- -
-
-
-
-
- - -
-
-
-
- - - - \ No newline at end of file diff --git a/html/_modules/taboot/tasks/command.html b/html/_modules/taboot/tasks/command.html deleted file mode 100644 index 6e045578b1f..00000000000 --- a/html/_modules/taboot/tasks/command.html +++ /dev/null @@ -1,129 +0,0 @@ - - - - - - - - - taboot.tasks.command — Taboot v0.4.0 documentation - - - - - - - - - - - - -
-
-
-
- -

Source code for taboot.tasks.command

-# -*- coding: utf-8 -*-
-# Taboot - Client utility for performing deployments with Func.
-# Copyright © 2009,2010, Red Hat, Inc.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-from taboot.tasks import FuncTask, TaskResult
-
-
-
[docs]class Run(FuncTask): - """ - Run arbitrary commands via Func. The arguments passed to __init__ - are used to execute func.overlord.Client.command.run(args). - - :Parameters: - - `command`: Command to run on the remote host - """ - - def __init__(self, command, **kwargs): - super(Run, self).__init__(command, **kwargs) - self._command = 'command.run' - - def _process_result(self, result): - t = TaskResult(self) - if result[0] == 0: - t.success = True - else: - t.success = False - t.output = result[1] - return t
-
- -
-
-
-
-
- - -
-
-
-
- - - - \ No newline at end of file diff --git a/html/_modules/taboot/tasks/mod_jk.html b/html/_modules/taboot/tasks/mod_jk.html deleted file mode 100644 index b94031b0100..00000000000 --- a/html/_modules/taboot/tasks/mod_jk.html +++ /dev/null @@ -1,190 +0,0 @@ - - - - - - - - - taboot.tasks.mod_jk — Taboot v0.4.0 documentation - - - - - - - - - - - - -
-
-
-
- -

Source code for taboot.tasks.mod_jk

-# -*- coding: utf-8 -*-
-# Taboot - Client utility for performing deployments with Func.
-# Copyright © 2009-2011, Red Hat, Inc.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-from taboot.tasks import BaseTask, FuncTask, TaskResult
-
-JK_ENABLE = 0
-JK_DISABLE = 1
-JK_STOP = 2
-
-
-class ToggleHost(FuncTask):
-    def __init__(self, action, proxyhost, **kwargs):
-        super(ToggleHost, self).__init__(proxyhost, **kwargs)
-        self._action = action
-        if action == JK_ENABLE:
-            self._command = 'taboot.modjk.enable_host'
-        elif action == JK_DISABLE:
-            self._command = 'taboot.modjk.disable_host'
-        elif action == JK_STOP:
-            self._command = 'taboot.modjk.stop_host'
-        else:
-            raise Exception("Undefined toggle action")
-
-    def _process_result(self, result):
-        t = TaskResult(self)
-        if len(result) > 0:
-            t.success = True
-            if self._action == JK_ENABLE:
-                verb = 'Enabled'
-            elif self._action == JK_DISABLE:
-                verb = 'Disabled'
-            elif self._action == JK_STOP:
-                verb = 'Stopped'
-
-            t.output = "%s AJP on the following balancer/worker " \
-                "pairs:\n" % verb
-            for balancer, worker in result:
-                t.output += "%s:  %s\n" % (balancer, worker)
-        else:
-            t.success = False
-            t.output = "Failed to find worker host"
-        return t
-
-
-class JKBaseTask(BaseTask):
-    def __init__(self, proxies, action, **kwargs):
-        super(JKBaseTask, self).__init__(**kwargs)
-        from sys import modules
-        self.proxies = proxies
-        self.jkaction = getattr(modules[self.__module__], "JK_%s" %
-                                action.upper())
-
-    def run(self, runner):
-        output = ""
-        success = True
-        for proxy in self.proxies:
-            toggler = ToggleHost(self.jkaction, self._host, host=proxy)
-            result = toggler.run(runner)
-            output += "%s:\n" % proxy
-            output += "%s\n" % result.output
-            if result.success == False:
-                success = False
-                break
-        return TaskResult(self, success=success, output=output)
-
-
-
[docs]class OutOfRotation(JKBaseTask): - """ - Remove an AJP node from rotation on a proxy via modjkapi access on - the proxy with func. - - :Parameters: - - `proxies`: A list of URLs to AJP jkmanage interfaces - """ - def __init__(self, proxies, action="stop", **kwargs): - super(OutOfRotation, self).__init__(proxies, action, **kwargs) - -
-
[docs]class InRotation(JKBaseTask): - """ - Put an AJP node in rotation on a proxy via modjkapi access on - the proxy with func. - - :Parameters: - - `proxies`: A list of URLs to AJP jkmanage interfaces - """ - def __init__(self, proxies, action="enable", **kwargs): - super(InRotation, self).__init__(proxies, action, **kwargs)
-
- -
-
-
-
-
- - -
-
-
-
- - - - \ No newline at end of file diff --git a/html/_modules/taboot/tasks/nagios.html b/html/_modules/taboot/tasks/nagios.html deleted file mode 100644 index e21129d18e9..00000000000 --- a/html/_modules/taboot/tasks/nagios.html +++ /dev/null @@ -1,284 +0,0 @@ - - - - - - - - - taboot.tasks.nagios — Taboot v0.4.0 documentation - - - - - - - - - - - - -
-
-
-
- -

Source code for taboot.tasks.nagios

-# -*- coding: utf-8 -*-
-# Taboot - Client utility for performing deployments with Func.
-# Copyright © 2009-2011, Red Hat, Inc.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-from taboot.tasks import BaseTask, TaskResult, FuncTask
-import taboot.errors
-import sys
-
-
-
[docs]class NagiosBase(FuncTask): - """ - All subsequent Nagios tasks are subclasses of this. - - Code note: Because a `FuncTask` expects to make connections to - `self.host` we need to switch `nagios_url` with `self.host` and - pass the original `self.host` as an argument. - - .. versionchanged:: 0.2.14 - - The previous version specified the `nagios_url` parameter as a - URL. To facilitate transitions we automatically correct URLs - into hostnames. - - Previously the `service` key was defined as a scalar, like - "HTTP" or "JBOSS". This version accepts that key as a scalar OR - as a list and "does the right thing" in each case. - """ - - def _fix_nagios_url(self, nagios_url): - """ - For backwards compatability we accept a Nagios URL that - identifies an HTTP resource. - - This method will take a string like http://foo.com/nagios/cmd.cgi - and return just the hostname component ("foo.com"). - """ - import re - return re.sub(r'(https?://)([^/]+)(.*)', r'\2', nagios_url) - - def _process_result(self, result): - t = TaskResult(self) - - if result.startswith("Fail: "): - t.success = False - else: - t.sucess = True - t.success = True - t.output = result - return t - -
-
[docs]class DisableAlerts(NagiosBase): - """ - Disable alerts for a host on a nagios instance - """ - - def __init__(self, nagios_url, **kwargs): - """ - :Parameters: - - `nagios_url`: Hostname of the Nagios server. - """ - target_host = kwargs['host'] - kwargs['host'] = self._fix_nagios_url(nagios_url) - super(DisableAlerts, self).__init__(target_host, **kwargs) - self._command = 'nagios.disable_host_notifications' - -
-
[docs]class EnableAlerts(NagiosBase): - """ - Enable alerts for a host on a nagios instance - """ - - def __init__(self, nagios_url, **kwargs): - """ - :Parameters: - - `nagios_url`: Hostname of the Nagios server. - """ - target_host = kwargs['host'] - kwargs['host'] = self._fix_nagios_url(nagios_url) - super(EnableAlerts, self).__init__(target_host, **kwargs) - self._command = 'nagios.enable_host_notifications' - -
-
[docs]class ScheduleDowntime(NagiosBase): - """ - Schedule downtime for services on a host in Nagios - """ - - def __init__(self, nagios_url, service='HOST', minutes=30, **kwargs): - """ - :Parameters: - - `nagios_url`: Hostname of the Nagios server. - - `service`: Service or list of services to schedule down for. - - `minutes`: The number of minutes to schedule downtime - for. Default is 30. - """ - import types - target_host = kwargs['host'] - kwargs['host'] = self._fix_nagios_url(nagios_url) - - if isinstance(service, types.StringTypes): - service = [service] - - if not isinstance(minutes, types.IntType): - if isinstance(minutes, types.FloatType): - minutes = int(minutes) - else: - raise TypeError("Invalid data given for minutes.", - "Expecting int type.", - "Got '%s'." % minutes) - - super(ScheduleDowntime, self).__init__(target_host, service, - minutes, **kwargs) - - if service == 'HOST': - self._command = "nagios.schedule_host_downtime" - else: - self._command = 'nagios.schedule_svc_downtime' - - def _process_result(self, result): - t = TaskResult(self) - t.success = True - for r in result: - if r.startswith("Fail: "): - t.success = t.success & False - else: - t.sucess = t.success & True - t.output = result - return t - -
-
[docs]class SilenceHost(NagiosBase): - """ - Silence all notifications for a given host - """ - - def __init__(self, nagios_url, **kwargs): - """ - :Parameters: - - `nagios_url`: Hostname of the Nagios server. - """ - target_host = kwargs['host'] - kwargs['host'] = self._fix_nagios_url(nagios_url) - super(SilenceHost, self).__init__(target_host, **kwargs) - self._command = 'nagios.silence_host' - - def _process_result(self, result): - t = TaskResult(self) - t.success = True - for r in result: - if r.startswith("Fail: "): - t.success = t.success & False - else: - t.sucess = t.success & True - t.output = result - return t - -
-
[docs]class UnsilenceHost(NagiosBase): - """ - Unsilence all notifications for a given host - """ - - def __init__(self, nagios_url, **kwargs): - """ - :Parameters: - - `nagios_url`: Hostname of the Nagios server. - """ - target_host = kwargs['host'] - kwargs['host'] = self._fix_nagios_url(nagios_url) - super(UnsilenceHost, self).__init__(target_host, **kwargs) - self._command = 'nagios.unsilence_host' - - def _process_result(self, result): - t = TaskResult(self) - t.success = True - for r in result: - if r.startswith("Fail: "): - t.success = t.success & False - else: - t.sucess = t.success & True - t.output = result - return t
-
- -
-
-
-
-
- - -
-
-
-
- - - - \ No newline at end of file diff --git a/html/_modules/taboot/tasks/poller.html b/html/_modules/taboot/tasks/poller.html deleted file mode 100644 index 6dc8165cb7c..00000000000 --- a/html/_modules/taboot/tasks/poller.html +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - - - - taboot.tasks.poller — Taboot v0.4.0 documentation - - - - - - - - - - - - -
-
-
-
- -

Source code for taboot.tasks.poller

-# -*- coding: utf-8 -*-
-# Taboot - Client utility for performing deployments with Func.
-# Copyright © 2009, Red Hat, Inc.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-from taboot.tasks import BaseTask
-from taboot.tasks import TaskResult
-import time
-
-
-
[docs]class PollTask(BaseTask): - """ - PollTask. A task that will poll a particular task until the task - succeeds or until max_attempts is reached. - - :Parameters: - - `task` The task to poll. - - `sleep_interval` The number of seconds to wait before trying - the task again. - - `max_attempts` The maximum number of attempts that the task - should be run. - - `fail_task` The task to run when max_attempts has been exhausted. - If no fail_task is provided, then a simple TaskResult - indicating failure is returned. - """ - - def __init__(self, task, sleep_interval=5, max_attempts=6, - fail_task=None, **kwargs): - super(PollTask, self).__init__(**kwargs) - self._task = task - self._sleep_interval = sleep_interval - self._max_attempts = max_attempts - self._fail_task = fail_task - - def run(self, runner): - for x in range(self._max_attempts): - result = runner.run_task(self._task) - if result.success: - return result - time.sleep(self._sleep_interval) - - # exhausted max_attempts - if self._fail_task != None: - return runner.run_task(self._fail_task) - else: - # return a "failed" TaskResult, stop executing further tasks - return TaskResult(self, success=False, - output="Max attempts of %s reached running %s" % - (self._max_attempts, repr(self._task)))
-
- -
-
-
-
-
- - -
-
-
-
- - - - \ No newline at end of file diff --git a/html/_modules/taboot/tasks/puppet.html b/html/_modules/taboot/tasks/puppet.html deleted file mode 100644 index ffb49ee3ec2..00000000000 --- a/html/_modules/taboot/tasks/puppet.html +++ /dev/null @@ -1,196 +0,0 @@ - - - - - - - - - taboot.tasks.puppet — Taboot v0.4.0 documentation - - - - - - - - - - - - -
-
-
-
- -

Source code for taboot.tasks.puppet

-# -*- coding: utf-8 -*-
-# Taboot - Client utility for performing deployments with Func.
-# Copyright © 2009-2011, Red Hat, Inc.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-from taboot.tasks import command, TaskResult
-import puppet
-
-
-
[docs]class PuppetBase(command.Run): - """ - Base class for puppet commands - """ - - def __init__(self, pcmd, **kwargs): - super(PuppetBase, self).__init__(pcmd, **kwargs) - -
-
[docs]class Run(PuppetBase): - """ - Run 'puppetd --test || true' - - :Optional Parameters: - - `server`: Puppetmaster to run against - - `noop`: If this should be a noop run (Boolean) - - `safe`: Abort if puppet errors (Boolean) - - See also: :py:meth:`taboot.tasks.Puppet.SafeRun` - """ - - def __init__(self, server="", noop=False, safe=False, **kwargs): - pcmd = "puppetd --test --color=false" - if server != "": - pcmd += " --server=%s" % server - if noop == True: - pcmd += " --noop" - if safe == False: - # If safe is False, ignore the return code of the puppet run - pcmd += " || true" - super(Run, self).__init__(pcmd, **kwargs) - - def run(self, runner): - result = super(Run, self).run(runner) - return PuppetTaskResult(result.taskObj, result.success, - result.output, result.ignore_errors) - -
-
[docs]class SafeRun(puppet.Run): - """ - Run 'puppetd --test'. - - How is this different from Run? Simple, it will abort everything - if puppet returns with a non-zero exit status. - """ - - def __init__(self, server="", **kwargs): - super(SafeRun, self).__init__(server, safe=True, **kwargs) - -
-
[docs]class Enable(PuppetBase): - """ - Run 'puppetd --enable'. - """ - - def __init__(self, **kwargs): - super(Enable, self).__init__('puppetd --enable', **kwargs) - -
-
[docs]class Disable(PuppetBase): - """ - Run 'puppetd --disable'. - """ - - def __init__(self, **kwargs): - super(Disable, self).__init__('puppetd --disable', **kwargs) - -
-
[docs]class DeleteLockfile(PuppetBase): - """ - Remove the puppet lock file. - """ - - def __init__(self, **kwargs): - PUPPET_LOCKFILE = "/var/lib/puppet/state/puppetdlock" - super(DeleteLockfile, self).__init__("rm -f %s" % PUPPET_LOCKFILE, - **kwargs) - -
-
[docs]class PuppetTaskResult(TaskResult): - """ - Wrapper around TaskResult to be able to differentiate in output class - """ - - def __init__(self, task, success=False, output='', ignore_errors=False): - super(PuppetTaskResult, self).__init__(task, success, output, - ignore_errors)
-
- -
-
-
-
-
- - -
-
-
-
- - - - \ No newline at end of file diff --git a/html/_modules/taboot/tasks/rpm.html b/html/_modules/taboot/tasks/rpm.html deleted file mode 100644 index 69b629eaafb..00000000000 --- a/html/_modules/taboot/tasks/rpm.html +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - - - - taboot.tasks.rpm — Taboot v0.4.0 documentation - - - - - - - - - - - - -
-
-
-
- -

Source code for taboot.tasks.rpm

-# -*- coding: utf-8 -*-
-# Taboot - Client utility for performing deployments with Func.
-# Copyright © 2009,2010, Red Hat, Inc.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-from taboot.tasks import command, TaskResult
-
-
-
[docs]class RPMBase(command.Run): - """ - Base class for rpm commands - """ - - def __init__(self, pcmd, **kwargs): - super(RPMBase, self).__init__(pcmd, **kwargs) - -
-
[docs]class PreManifest(command.Run): - """ - Gather list of installed RPMs. A later invocation of :class:`PostManifest` - is then used to output the RPMs changed during intermediate tasks. - """ - - def __init__(self, **kwargs): - super(PreManifest, self).__init__('rpm -qa | sort', **kwargs) - -
[docs] def run(self, runner): - """ - Override the default :class:`command.Run` to strip the output - from the result because we're really not interested in the - contents of the pre-manifest; we just want to collect it to - compare later on with PostManifest. - """ - - result = super(PreManifest, self).run(runner) - runner['rpm.PreManifest'] = result.output - result.output = '' - return result - -
-
[docs]class PostManifest(command.Run): - """ - Gather list of installed RPMs and compare against a previously - taken :class:`PreManifest` - """ - - from difflib import Differ as _Differ - - def __init__(self, **kwargs): - super(PostManifest, self).__init__('rpm -qa | sort', **kwargs) - -
[docs] def run(self, runner): - """ - The runner that gets passed in contains state that can be - access via dict-like access. PreManifest uses this to write - to the rpm.Premanifest field. So we'll check to make sure the - pre-manifest is there by looking for that state. - """ - try: - pre_manifest = runner['rpm.PreManifest'] - except: - return TaskResult(self, success=False, - output="You must use PreManifest before PostManifest") - - # ok, so now we have something to compare against so we get - # new state... - result = super(command.Run, self).run(runner) - - old_list = pre_manifest.splitlines(1) - new_list = result.output.splitlines(1) - - differ = self._Differ() - diff_output = list(differ.compare(old_list, new_list)) - diff_output = [line for line in diff_output if line[0] in ('+', '-')] - - result.output = ''.join(diff_output) - - return RPMTaskResult(result.taskObj, result.success, - result.output, result.ignore_errors) - -
-
[docs]class RPMTaskResult(TaskResult): - """ - Wrapper around TaskResult to be able to differentiate in output class - """ - - def __init__(self, task, success=False, output='', ignore_errors=False): - super(RPMTaskResult, self).__init__(task, success, output, - ignore_errors)
-
- -
-
-
-
-
- - -
-
-
-
- - - - \ No newline at end of file diff --git a/html/_modules/taboot/tasks/service.html b/html/_modules/taboot/tasks/service.html deleted file mode 100644 index 98e238d47d9..00000000000 --- a/html/_modules/taboot/tasks/service.html +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - - - - taboot.tasks.service — Taboot v0.4.0 documentation - - - - - - - - - - - - -
-
-
-
- -

Source code for taboot.tasks.service

-# -*- coding: utf-8 -*-
-# Taboot - Client utility for performing deployments with Func.
-# Copyright © 2009,2011, Red Hat, Inc.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-from taboot.tasks import command
-
-
-
[docs]class ServiceBase(command.Run): - """ - Base Class for system service tasks - """ - pass - -
-
[docs]class Start(ServiceBase): - """ - Start a service. - - Arguments: - - ``service`` - The service to start. - """ - - def __init__(self, service, **kwargs): - super(Start, self).__init__('service %s start' % service, **kwargs) - -
-
[docs]class Stop(ServiceBase): - """ - Stop a service. - - Arguments: - - ``service`` - The service to stop. - """ - - def __init__(self, service, **kwargs): - super(Stop, self).__init__('service %s stop' % service, **kwargs) - -
-
[docs]class Restart(ServiceBase): - """ - Restart a service. - - Arguments: - - ``service`` - The service to restart. - """ - - def __init__(self, service, **kwargs): - super(Restart, self).__init__('service %s restart' % service, **kwargs)
-
- -
-
-
-
-
- - -
-
-
-
- - - - \ No newline at end of file diff --git a/html/_modules/taboot/tasks/sleep.html b/html/_modules/taboot/tasks/sleep.html deleted file mode 100644 index a6274052935..00000000000 --- a/html/_modules/taboot/tasks/sleep.html +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - - - - taboot.tasks.sleep — Taboot v0.4.0 documentation - - - - - - - - - - - - -
-
-
-
- -

Source code for taboot.tasks.sleep

-# -*- coding: utf-8 -*-
-# Taboot - Client utility for performing deployments with Func.
-# Copyright © 2011, Red Hat, Inc.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-from taboot.tasks import BaseTask, TaskResult
-from termios import tcflush, TCIFLUSH
-import sys
-
-
-
[docs]class SleepBase(BaseTask): - """ - Base class for task-queue pausing classes. - """ - - def __init__(self, **kwargs): - super(SleepBase, self).__init__(**kwargs) - -
-
[docs]class Seconds(SleepBase): - """ - Halt task processing on a node for a certain number of seconds. - - :Parameters: - - `seconds`: Number of seconds to halt execution for. - """ - - def __init__(self, seconds=60, **kwargs): - super(Seconds, self).__init__(**kwargs) - self._seconds = seconds - - def run(self, runner): - import time - time.sleep(self._seconds) - return TaskResult(self, success=True, - output="Paused for %s seconds" % - self._seconds) - -
-
[docs]class Minutes(SleepBase): - """ - Halt task processing on a node for a certain number of minutes. - - :Parameters: - - `minutes`: Number of minutes to halt execution for. - """ - - def __init__(self, minutes=1, **kwargs): - super(Minutes, self).__init__(**kwargs) - self._minutes = minutes - self._seconds = minutes * 60 - - def run(self, runner): - import time - time.sleep(self._seconds) - return TaskResult(self, success=True, - output="Paused for %s minutes" % - self._minutes) - -
-
[docs]class WaitOnInput(SleepBase): - """ - Halt task processing on a node until the user presses enter. - - :Parameters: - - `message`: The message to prompt on the CLI. - """ - - def __init__(self, message="Press enter to continue\n", **kwargs): - super(WaitOnInput, self).__init__(**kwargs) - self._message = message - self.concurrentFriendly = False - - def run(self, runner): - import time - start = time.time() - tcflush(sys.stdin, TCIFLUSH) - raw_input(self._message) - return TaskResult(self, success=True, - output="Paused for %s seconds" % - (time.time() - start))
-
- -
-
-
-
-
- - -
-
-
-
- - - - \ No newline at end of file diff --git a/html/_modules/taboot/tasks/yum.html b/html/_modules/taboot/tasks/yum.html deleted file mode 100644 index 49945efa7a1..00000000000 --- a/html/_modules/taboot/tasks/yum.html +++ /dev/null @@ -1,166 +0,0 @@ - - - - - - - - - taboot.tasks.yum — Taboot v0.4.0 documentation - - - - - - - - - - - - -
-
-
-
- -

Source code for taboot.tasks.yum

-# -*- coding: utf-8 -*-
-# Taboot - Client utility for performing deployments with Func.
-# Copyright © 2009, Red Hat, Inc.
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-from taboot.tasks import command, BaseTask
-
-
-
[docs]class YumBase(BaseTask): - """ - Base class for all Yum-related tasks. - """ - - def __init__(self, packages): - if isinstance(packages, list): - self._packages = packages - self._packages_str = ' '.join(packages) - else: - self._packages = [packages] - self._packages_str = packages - -
-
[docs]class Install(YumBase, command.Run): - """ - Install one or more packages. - """ - - def __init__(self, packages, **kwargs): - """ - :Parameters: - - `packages`: A list of packages to install - """ - YumBase.__init__(self, packages) - command.Run.__init__(self, 'yum install -y %s' % self._packages_str, - **kwargs) - -
-
[docs]class Update(YumBase, command.Run): - """ - Update one or more packages. - """ - - def __init__(self, packages=[], **kwargs): - """ - :Parameters: - - `packages`: A list of packages to update. If `packages` is empty, - update all packages on the system. - """ - YumBase.__init__(self, packages) - command.Run.__init__(self, 'yum update -y %s' % self._packages_str, - **kwargs) - -
-
[docs]class Remove(YumBase, command.Run): - """ - Remove one or more packages. - """ - - def __init__(self, packages, **kwargs): - """ - :Parameters: - - `packages`: A list of packages to remove. - """ - YumBase.__init__(self, packages) - command.Run.__init__(self, 'yum remove -y %s' % self._packages_str, - **kwargs)
-
- -
-
-
-
-
- - -
-
-
-
- - - - \ No newline at end of file diff --git a/html/_sources/code.txt b/html/_sources/code.txt deleted file mode 100644 index 4a12e449d60..00000000000 --- a/html/_sources/code.txt +++ /dev/null @@ -1,78 +0,0 @@ -Code -==== - -Taboot ------- -.. automodule:: taboot - :members: - :undoc-members: - -Taboot runner -------------- -.. automodule:: taboot.runner - :members: - :undoc-members: - -.. _taboot.tasks: - -Taboot tasks ------------- -.. automodule:: taboot.tasks - :members: - -AJP Tasks -^^^^^^^^^ -.. automodule:: taboot.tasks.mod_jk - :members: - -Command tasks -^^^^^^^^^^^^^ -.. automodule:: taboot.tasks.command - :members: - -Misc tasks -^^^^^^^^^^ -.. automodule:: taboot.tasks.misc - :members: - -Nagios tasks -^^^^^^^^^^^^ -.. automodule:: taboot.tasks.nagios - :members: - -Polling tasks -^^^^^^^^^^^^^ -.. automodule:: taboot.tasks.poller - :members: - -Puppet tasks -^^^^^^^^^^^^ -.. automodule:: taboot.tasks.puppet - :members: - -RPM tasks -^^^^^^^^^ -.. automodule:: taboot.tasks.rpm - :members: - -Service tasks -^^^^^^^^^^^^^ -.. automodule:: taboot.tasks.service - :members: - -Sleep tasks -^^^^^^^^^^^ -.. automodule:: taboot.tasks.sleep - :members: - -Yum tasks -^^^^^^^^^ -.. automodule:: taboot.tasks.yum - :members: - -Taboot output -------------- -.. automodule:: taboot.output - :members: - :undoc-members: - diff --git a/html/_sources/development.txt b/html/_sources/development.txt deleted file mode 100644 index cb74b86da44..00000000000 --- a/html/_sources/development.txt +++ /dev/null @@ -1,98 +0,0 @@ -Development -=========== - -Tools ------ - -Taboot uses what is becoming a pretty standard and a quite simple -toolset. - - -Required Tools -`````````````` - #. `python `_ - The python programming language - #. `distutils `_ - Python building and packaging library - #. `git `_ - Source code management - #. `Func `_ - The Fedora Unified Network Controller - #. `an `_ `editor `_ or `ide `_ `that `_ doesn't suck - - - -Optional Tools -`````````````` -These should be available via your package manager: - - #. `rpm-build `_ - Should be packaged in your RPM distribution - #. `pep8 `_ - Check your patches for pep8 compliance with ``make pep8`` - - -Source ------- -You can clone the repo via :program:`git` through the following command::: - - $ git clone git://git.fedorahosted.org/Taboot.git - - -:pep:`0008` should be followed. This outlines the highlights that we -require above and beyond. Your code must follow this (or note why it -can't) before patches will be accepted. - - * global variables should be in ALLCAPPS - * attributes should be all lowercase - * classes should be ``CamelCased``, filenames should be ``lowercase``. - * functions and methods should be lowercase with spaces replaced with _'s:: - - def a_test_method(self): - pass - - * classes should subclass ``object`` unless it subclasses a different object:: - - class Person(object): - pass - - class Steve(Person): - pass - - * 4 spaces per indent level - * max length is 79 chars. - * single quotes preferred over double quotes. - * avoid ``from x import *`` imports unless a must use - * modules, functions, classes, and methods all must have docstrings - doc strings should be descriptive of what objects, functions, and methods do - * document any potentially confusing sections of code - * functions and methods should be broken down in such a way as to be easily understood and self contained - * use descriptive variable names, only use things like x, y, etc.. when doing integer loops and even then see if you can use more descriptive names - -.. note:: - The ``Makefile`` included in the root of the source distribution - includes a target called ``pep8``. Run ``make pep8`` to - automatically scan the ``taboot/`` subdirectory for violations. - - - -Git ---- - -The best way to develop on Taboot is to branch feature sets. For -instance, if you were to add xml deserialization you would want to -branch locally and work on that branch.:: - - $ git branch - * master - $ git status - # On branch master - nothing to commit (working directory clean) - $ git branch xmldeserialization - $ git checkout xmldeserialization - -Now we pretend you are all finished and have done at least one commit to the xmldeserialization branch.:: - - - $ git-format-patch master - 0001-created-initial-classes.patch - 0002-added-in-documentation.patch - $ - - -You now have patch sets which you can send in for perusal and -acceptance. Open a new ticket in our issue tracker or attach them to -an existing ticket. diff --git a/html/_sources/index.txt b/html/_sources/index.txt index 30d8bb14e2c..9af75f428bd 100644 --- a/html/_sources/index.txt +++ b/html/_sources/index.txt @@ -50,22 +50,57 @@ Requirements are extremely minimal. If you are running python 2.6 on the **overlord** machine, you will need: -* paramiko -* python-jinja2 -* PyYAML (if using playbooks) +* ``paramiko`` +* ``PyYAML`` +* ``Asciidoc`` (for building documentation) -If you are running less than Python 2.6, you will also need +If you are running less than Python 2.6, you will also need: -* the Python 2.4 or 2.5 backport of the multiprocessing module -* simplejson +* The Python 2.4 or 2.5 backport of the multiprocessing module + * `Installation and Testing Instructions `_ +* ``simplejson`` On the managed nodes, to use templating, you will need: -* python-jinja2 (you can install this with ansible) +* ``python-jinja2`` (you can install this with ansible) +Getting Ansible +``````````````` -Contents: +Tagged releases are available as tar.gz files from the Ansible github +project page: + +* `Ansible/downloads `_ + +You can also clone the git repository yourself and install Ansible in +one of two ways: + + +Python Distutils +++++++++++++++++ + +You can install Ansible using Python Distutils:: + + $ git clone git://github.com/ansible/ansible.git + $ cd ./ansible + $ sudo make install + + +Via RPM ++++++++ + +In the future, pre-built RPMs may be available. Until that time you +can use the ``make rpm`` command:: + + $ git clone git://github.com/ansible/ansible.git + $ cd ./ansible + $ make rpm + $ sudo rpm -Uvh ~/rpmbuild/RPMS/noarch/ansible-1.0-1.noarch.rpm + + +Contents +======== .. toctree:: :maxdepth: 3 @@ -75,15 +110,17 @@ Contents: patterns modules playbooks + examples api communicate - examples man -Indices and tables -================== -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` +Communicate or Get Involved +=========================== + +* Join the `ansible-project mailing list `_ on Google Groups +* Join `#ansible `_ on the `freenode IRC network `_ +* Visit the `project page `_ on Github + - View the `issue tracker `_ diff --git a/html/_sources/install.txt b/html/_sources/install.txt deleted file mode 100644 index 6fa077a5490..00000000000 --- a/html/_sources/install.txt +++ /dev/null @@ -1,56 +0,0 @@ -Install -======= - - -From Yum --------- - -Taboot is in the Fedora package repositories. Installing it should be as simple as:: - - sudo yum install python-taboot - - -From Source ------------ - -You'll need these dependencies to build/install: - - #. `python `_ - The python programming language along with python-setuptools - #. `distutils `_ - Python building and packaging library - -Building documentation requires some more deps. These are **required** -if you're building RPMs, and optional if you're installing manually: - - #. python-sphinx - #. asciidoc - #. libxslt - - -Building RPMs from source -````````````````````````` - -This is the recommended installation method if you're pulling Taboot -from source:: - - make rpm - sudo yum localinstall /path/to/rpm - - -Installing From source -`````````````````````` - -I **don't** recommend this. But if you're dead set on installing -directly from source you still can. This calls the python -``distutils`` installer directly:: - - sudo make install - -If you wish to build and install the optional documentation you'll -need some additional packages so it can be built fully. Install the -documentation with this command:: - - sudo make installdocs - -Uninstall everything with:: - - sudo make uninstall diff --git a/html/_sources/man.txt b/html/_sources/man.txt index 6c6497fc930..d25477bf110 100644 --- a/html/_sources/man.txt +++ b/html/_sources/man.txt @@ -5,12 +5,17 @@ Man Pages Ansile ships with a handfull of manpages to help you on your journey. -taboot(1) ---------- +ansible(1) +---------- -`View taboot.1 `_ +* `View ansible.1 `_ -taboot-tasks(5) ---------------- +ansible-modules(5) +------------------ -`View taboot-tasks.5 `_ +* `View ansible-modules.5 `_ + +ansible-playbook(5) +------------------- + +* `View ansible-playbook.5 `_ diff --git a/html/_sources/tasks.txt b/html/_sources/tasks.txt deleted file mode 100644 index bf644a9174f..00000000000 --- a/html/_sources/tasks.txt +++ /dev/null @@ -1,16 +0,0 @@ -.. _tasks: - -Tasks ------ - -All the built-in tasks are documented here. - -.. include:: tasks/command.rst -.. include:: tasks/service.rst -.. include:: tasks/puppet.rst -.. include:: tasks/nagios.rst -.. include:: tasks/sleep.rst -.. include:: tasks/yum.rst -.. include:: tasks/rpm.rst -.. include:: tasks/mod_jk.rst -.. include:: tasks/misc.rst diff --git a/html/api.html b/html/api.html index b9678e2b149..cbefb35547f 100644 --- a/html/api.html +++ b/html/api.html @@ -24,7 +24,7 @@ - + -
-

Indices and tables

+
+

Communicate or Get Involved

@@ -150,12 +185,18 @@ need:

  • Ansible

    Next topic

    diff --git a/html/install.html b/html/install.html deleted file mode 100644 index 7519c4e86c9..00000000000 --- a/html/install.html +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - - Install — Taboot v0.4.0 documentation - - - - - - - - - - - -
    -
    -
    -
    - -
    -

    Install

    -
    -

    From Yum

    -

    Taboot is in the Fedora package repositories. Installing it should be as simple as:

    -
    sudo yum install python-taboot
    -
    -
    -
    -

    From Source

    -

    You’ll need these dependencies to build/install:

    -
    -
      -
    1. python - The python programming language along with python-setuptools
    2. -
    3. distutils - Python building and packaging library
    4. -
    -
    -

    Building documentation requires some more deps. These are required -if you’re building RPMs, and optional if you’re installing manually:

    -
    -
      -
    1. python-sphinx
    2. -
    3. asciidoc
    4. -
    5. libxslt
    6. -
    -
    -
    -

    Building RPMs from source

    -

    This is the recommended installation method if you’re pulling Taboot -from source:

    -
    make rpm
    -sudo yum localinstall /path/to/rpm
    -
    -
    -
    -

    Installing From source

    -

    I don’t recommend this. But if you’re dead set on installing -directly from source you still can. This calls the python -distutils installer directly:

    -
    sudo make install
    -
    -

    If you wish to build and install the optional documentation you’ll -need some additional packages so it can be built fully. Install the -documentation with this command:

    -
    sudo make installdocs
    -
    -

    Uninstall everything with:

    -
    sudo make uninstall
    -
    -
    -
    -
    - - -
    -
    -
    -
    -
    -

    Table Of Contents

    - - -

    This Page

    - - - -
    -
    -
    -
    - - - - \ No newline at end of file diff --git a/html/man.html b/html/man.html index 8e16d106e58..a4aab93a8c4 100644 --- a/html/man.html +++ b/html/man.html @@ -23,7 +23,7 @@ - +
  • - previous |
  • Ansible v0.0.1 documentation »
@@ -47,13 +47,23 @@

Man Pages

Ansile ships with a handfull of manpages to help you on your journey.

-
-

taboot(1)

-

View taboot.1

+
+

ansible(1)

+ +
+
+

ansible-modules(5)

+
-
-

taboot-tasks(5)

-

View taboot-tasks.5

+
+

ansible-playbook(5)

+
@@ -66,15 +76,16 @@

Table Of Contents

Previous topic

-

Examples

+

Communicate

This Page

diff --git a/html/man/ansible-modules.5.html b/html/man/ansible-modules.5.html index 83438af1ade..61276a5bc6f 100644 --- a/html/man/ansible-modules.5.html +++ b/html/man/ansible-modules.5.html @@ -1,6 +1,6 @@ -ansible-modules

Name

ansible-modules — stock modules shipped with ansible

DESCRIPTION

Ansible ships with a number of modules that can be executed directly on remote hosts or through +ansible-modules

Name

ansible-modules — stock modules shipped with ansible

DESCRIPTION

Ansible ships with a number of modules that can be executed directly on remote hosts or through ansible playbooks.

IDEMPOTENCE

Most modules other than command are idempotent, meaning they will seek to avoid changes unless a change needs to be made. When using ansible playbooks, these modules can trigger change events, as described in ansible-playbooks(5).

Unless otherwise noted, all modules support change hooks.

command

The command module takes the command name followed by a list of arguments, space delimited. diff --git a/html/man/ansible-playbook.5.html b/html/man/ansible-playbook.5.html index 37dfc3c59fc..1f100d55067 100644 --- a/html/man/ansible-playbook.5.html +++ b/html/man/ansible-playbook.5.html @@ -1,6 +1,6 @@ -ansible-modules

Name

ansible-playbook — format and function of an ansible playbook file

DESCRIPTION

Ansible ships with ansible-playbook, a tool for running playbooks. +ansible-modules

Name

ansible-playbook — format and function of an ansible playbook file

DESCRIPTION

Ansible ships with ansible-playbook, a tool for running playbooks. Playbooks can represent frequent tasks, desired system configurations, or deployment processes.

FORMAT

Playbooks are written in YAML.

EXAMPLE

See:

  • https://github.com/mpdehaan/ansible/blob/master/examples/playbook.yml diff --git a/html/man/ansible.1.html b/html/man/ansible.1.html index 36ae3f75139..73067689459 100644 --- a/html/man/ansible.1.html +++ b/html/man/ansible.1.html @@ -1,6 +1,6 @@ -ansible

    Name

    ansible — run a command somewhere else

    Synopsis

    ansible <host-pattern> [-f forks] [-m module_name] [-a args]

    DESCRIPTION

    Ansible is an extra-simple tool/framework/API for doing 'remote things' over +ansible

    Name

    ansible — run a command somewhere else

    Synopsis

    ansible <host-pattern> [-f forks] [-m module_name] [-a args]

    DESCRIPTION

    Ansible is an extra-simple tool/framework/API for doing 'remote things' over SSH.

    ARGUMENTS

    host-pattern
    diff --git a/html/playbooks.html b/html/playbooks.html index ca883f51c1e..be57c481344 100644 --- a/html/playbooks.html +++ b/html/playbooks.html @@ -23,7 +23,7 @@ - + @@ -34,7 +34,7 @@ index
  • - next |
  • Modules

    Next topic

    -

    API

    +

    Examples

    This Page

    • index
    • - next |
    • - - - - - - Python Module Index — Taboot v0.4.0 documentation - - - - - - - - - - - - - - -
      -
      -
      -
      - - -

      Python Module Index

      - -
      - t -
      - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
       
      - t
      - taboot -
          - taboot.output -
          - taboot.runner -
          - taboot.tasks -
          - taboot.tasks.command -
          - taboot.tasks.mod_jk -
          - taboot.tasks.nagios -
          - taboot.tasks.poller -
          - taboot.tasks.puppet -
          - taboot.tasks.rpm -
          - taboot.tasks.service -
          - taboot.tasks.sleep -
          - taboot.tasks.yum -
      - - -
      -
      -
      -
      -
      - - -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/html/searchindex.js b/html/searchindex.js index 870a6686bd7..dadd4bb1622 100644 --- a/html/searchindex.js +++ b/html/searchindex.js @@ -1 +1 @@ -Search.setIndex({objects:{},terms:{represent:[],all:5,code:1,func:1,mcollect:1,global:[],steve:[],signific:[],rhoncu:[0,2,3,4,6,7,8],sleep:[],lacu:[0,2,3,4,6,7,8],abil:[],follow:[],nunc:[0,2,3,4,6,7,8],depend:[],yumbas:[],puppetmaster01:[],intermedi:[],specif:[],send:[],easiest:1,program:[],present:[],text:[],downtim:[],vel:[0,2,3,4,6,7,8],blindingli:1,"case":[],sourc:1,everi:5,string:[],puppettaskresult:[],fals:5,mod_jk:[],util:[],consequat:[0,2,3,4,6,7,8],continuen:[],failur:[],veri:1,fail_task:[],ticket:[],risu:[0,2,3,4,6,7,8],luctu:[0,2,3,4,6,7,8],level:5,list:5,scalar:[],"try":[],item:5,concurr:[],form:5,verif:[],dotnet:5,saltstack:1,setup:1,ornar:[0,2,3,4,6,7,8],x86_64:[],outlin:[],minion:[],sync:[],second:5,design:1,pass:[],eleifend:[0,2,3,4,6,7,8],further:1,even:[],index:1,what:[0,1],diam:[0,2,3,4,6,7,8],compar:[],section:[],abl:1,nec:[0,2,3,4,6,7,8],uniform:[],access:[],delet:[],abbrevi:5,version:[],"new":[],ever:1,method:[],suscipit:[0,2,3,4,6,7,8],deriv:[],absolut:[],eckersberg:5,gener:[],max_attempt:[],sleepbas:[],here:[],leo:[0,2,3,4,6,7,8],bodi:[],shouldn:[],let:[],path:[],along:[],becom:[],valu:5,wait:[],scelerisqu:[0,2,3,4,6,7,8],great:[],premanifest:[],my_email:[],silencehost:[],larger:1,host:[],later:[],queue:[],unsil:[],a_test_method:[],permit:5,action:[],nulla:[0,2,3,4,6,7,8],chang:[],iaculi:[0,2,3,4,6,7,8],via:[],regardless:[5,1],dictionari:5,extra:1,modul:[1,2],prefer:1,releas:[],"boolean":5,instal:1,should:5,kei:5,httpd:[],from:[],describ:[],would:[],commun:[1,3],doubl:[],regist:[],two:5,next:[],connector:[],modjkapi:[],call:[],recommend:[],taken:[],dict:[],sagitti:[0,2,3,4,6,7,8],type:[],until:[],more:1,sort:[],wrapper:[],sleep_interv:[],nequ:[0,2,3,4,6,7,8],relat:[],emailoutput:[],about:5,outputt:[],enhanc:[],accept:[],proceed:[],particular:[],indent:5,compani:[],cach:[],must:5,none:[],dep:[],habitass:[0,2,3,4,6,7,8],phasellu:[0,2,3,4,6,7,8],work:[],can:[5,1],nagio:[],root:[5,1],def:[],control:[],prompt:[],encapsul:[],yamllint:5,ultric:[0,2,3,4,6,7,8],process:[],lock:[],sudo:[],indic:1,knows_oop:5,abort:[],want:1,nullam:[0,2,3,4,6,7,8],alwai:1,differenti:[],multipl:[],newlin:5,puru:[0,2,3,4,6,7,8],lame:5,capistrano:1,anoth:[],write:5,how:0,etiam:[0,2,3,4,6,7,8],sever:5,baseoutput:[],subdirectori:[],verifi:[],simpl:[5,1],updat:[],arcu:[0,2,3,4,6,7,8],max:[],clone:[],invok:[],usabl:1,befor:[],catalog:[],lot:1,puppetd:[],date:[],end:[],suck:[],data:5,parallel:1,man:[1,9],bibendum:[0,2,3,4,6,7,8],attempt:[],sit:[0,2,3,4,6,7,8],favorit:1,turpi:[0,2,3,4,6,7,8],element:5,caus:[],"switch":[],mango:5,combin:5,allow:[],enter:[],callabl:[],order:[],talk:1,dignissim:[0,2,3,4,6,7,8],oper:[],velit:[0,2,3,4,6,7,8],rotat:[],semaphor:[],over:1,orang:5,becaus:1,elit:[0,2,3,4,5,6,7,8],saferun:[],comma:5,lockfil:[],datestamp:[],vita:[0,2,3,4,6,7,8],still:1,paramet:[],shorter:[],overlord:1,group:[],cli:[],fit:1,nagios_url:[],taboot:[1,9],puppetmast:[],yaml:[5,0,1],restart:[],distutil:[],sapien:[0,2,3,4,6,7,8],might:[],non:[0,1,2,3,4,6,7,8],"return":[],greater:[],thei:1,food:5,safe:[],nibh:[0,2,3,4,6,7,8],initi:[],egesta:[0,2,3,4,6,7,8],framework:[],jinja2:1,facilit:[],"_write":[],now:[],logoutput:[],ipsum:[0,2,3,4,6,7,8],hhmmss:[],subdomain:[],name:5,config:1,viverra:[0,2,3,4,6,7,8],revers:[],authent:[],porta:[0,2,3,4,6,7,8],separ:5,easili:[],exampl:[1,8],each:5,puppet:[],notif:[],metu:[0,2,3,4,6,7,8],clioutput:[],replac:[],auctor:[0,2,3,4,6,7,8],enim:[0,2,3,4,6,7,8],continu:[],realli:5,backport:1,expect:[],our:[],happen:[],beyond:[],event:[],special:[],out:5,variabl:[],vivamu:[0,2,3,4,6,7,8],network:[],space:[],ajp:[],open:[],deletelockfil:[],content:1,print:[],correct:[5,1],proxi:[],hendrerit:[0,2,3,4,6,7,8],contain:[],given:[],standard:[],reason:[],base:1,tempu:[0,2,3,4,6,7,8],put:[],org:[],pretend:[],molli:[0,2,3,4,6,7,8],bash:1,care:1,vestibulum:[0,2,3,4,6,7,8],pyyaml:1,deletedockfil:[],thread:[],maecena:[0,2,3,4,6,7,8],could:[],omit:[],thing:1,length:[],xmldeseri:[],outsid:[],principl:1,confus:[],support:[],user:1,origin:[],softwar:1,rpmtaskresult:[],obviou:1,prevent:[],onc:[],misc:[],number:[],placehold:[],mai:[],instruct:[],done:[],messag:[],kerbero:[],miss:[],differ:1,"long":1,script:[5,0,1],associ:5,interact:[],system:1,least:[],grow:1,mercuri:[],attach:[],silenc:[],master:[],toolset:[],molesti:[0,2,3,4,6,7,8],john:5,"final":5,includ:[],shell:[],option:5,tool:1,setuptool:[],specifi:5,quam:[0,2,3,4,6,7,8],taskresult:[],checkout:[],enablealert:[],than:1,serv:1,kind:[],target:[],keyword:[],provid:5,remov:[],sollicitudin:[0,2,3,4,6,7,8],zero:[],structur:5,banana:5,faucibu:[0,2,3,4,6,7,8],balanc:[],were:[],minut:[],uses_cv:5,fail_ev:[],pre:[],behavior:[],runner:[],respons:[],ani:1,ant:[0,2,3,4,6,7,8],download:[],have:1,tabl:1,need:[5,0,1],seen:[],tellu:[0,2,3,4,6,7,8],paramiko:1,issu:[],engin:[],squar:5,equival:[],pep8:[],self:[],violat:[],note:[],also:[5,0,1],without:[],massa:[0,2,3,4,6,7,8],take:1,which:1,environ:[],schedul:[],noth:[],singl:[],pulvinar:[0,2,3,4,6,7,8],jkmanag:[],simplifi:[],begin:5,sure:[],unless:[],distribut:1,deploy:1,buffer:[],glob:[],object:[],reach:[],most:5,employe:5,plan:[],"class":[],porttitor:[0,2,3,4,6,7,8],strawberri:5,don:[],url:[],doc:1,gather:[],cover:[],doe:[],sodal:[0,2,3,4,6,7,8],ext:[],bracket:5,yum:[],clean:[],dolor:[0,2,3,4,6,7,8],pcmd:[],modularli:1,awesom:1,ullamcorp:[0,2,3,4,6,7,8],show:[],blandit:[0,2,3,4,6,7,8],syntax:[5,0],directli:[],session:[],playbook:[1,4],hack:1,funcerrortask:[],find:[],help:9,xml:[],current:[],onli:1,explicitli:[],acquir:[],pretti:[],paranoid:[],configur:1,apach:[],state:[],accumsan:[0,2,3,4,6,7,8],consectetur:[0,2,3,4,6,7,8],suppos:[],templat:1,variu:[0,2,3,4,6,7,8],local:[],variou:1,get:[5,0,1],between:5,stop:[],repo:[],ssh:1,progress:[],malesuada:[0,2,3,4,6,7,8],requir:1,perus:[],nisi:[0,2,3,4,6,7,8],enabl:[],nisl:[0,2,3,4,6,7,8],patch:[],unsilencehost:[],bad:[],cra:[0,2,3,4,6,7,8],common:[],orci:[0,2,3,4,6,7,8],through:[],wrote:1,view:9,set:[],elimin:1,displai:[],see:[5,0,1],sed:[0,2,3,4,6,7,8],result:[],arg:[],sem:[0,2,3,4,6,7,8],charact:5,best:[],statu:[],varri:[],pattern:[1,6],someth:1,www01:[],www02:[],www03:[],written:1,my_boss:[],installdoc:[],"import":[],loadbalanc:[],attribut:[],elementum:[0,2,3,4,6,7,8],manpag:9,screen:[],handful:9,aspir:1,job:5,magna:[0,2,3,4,6,7,8],amet:[0,2,3,4,6,7,8],addit:[5,1],last:[],plugin:1,inrot:[],logfil:[],disablealert:[],against:[],tempor:[0,2,3,4,6,7,8],etc:1,instanc:[],expand_glob:[],com:[],proin:[0,2,3,4,6,7,8],color:[],foobar:[],format:[],period:[],polltask:[],diff:[],poll:[],rpm:[],matti:[0,2,3,4,6,7,8],backend:[],dui:[0,2,3,4,6,7,8],java:[],pretium:[0,2,3,4,6,7,8],addition:[],morbi:[0,2,3,4,6,7,8],three:[],been:[],ran:[],trigger:[],leav:[],interest:[],basic:[5,1],aliquam:[0,2,3,4,6,7,8],feugiat:[0,2,3,4,6,7,8],infrastructur:1,dry:[],noop:[],postmanifest:[],rubi:5,search:1,vulput:[0,2,3,4,6,7,8],argument:[],likes_emac:5,understand:0,togeth:[],donec:[0,2,3,4,6,7,8],minim:1,repetit:[],those:[],emploi:5,"char":[],save:[],tortor:[0,2,3,4,6,7,8],look:[],enablenotif:[],packag:[],servic:[],defin:[],"while":1,overrid:[],unifi:[],abov:[],error:[],laoreet:[0,2,3,4,6,7,8],invoc:[],ero:[0,2,3,4,6,7,8],localinstal:[],loop:[],scan:[],dictum:[0,2,3,4,6,7,8],stdout:[],basetask:[],them:[],erat:[0,2,3,4,6,7,8],kwarg:[],conf:[],fedorahost:[],ship:9,"__init__":[],halt:[],parent:[],adipisc:[0,2,3,4,6,7,8],develop:5,fedora:[],author:[],perform:[],make:[],platea:[0,2,3,4,6,7,8],venenati:[0,2,3,4,6,7,8],same:5,member:5,python:[5,1],html:[],proxyjava02:[],proxyjava01:[],document:0,ansibl:[5,0,1],complet:0,exhaust:[],finish:[],http:[],hostnam:[],taskrunn:[],pick:1,effect:[],box:1,alert:[],remot:1,fruit:5,fusc:[0,2,3,4,6,7,8],extrem:1,qui:[0,2,3,4,6,7,8],placerat:[0,2,3,4,6,7,8],expand:[],built:[],task:[1,9],els:1,whole:1,inherit:[],person:[],client:1,command:1,thi:[5,1],produc:[],libxslt:[],everyth:[],identifi:[],paus:[],just:[],less:1,skill:5,poller:[],languag:[5,1],previous:[],web:[],versu:1,field:[],run_task:[],hac:[0,2,3,4,6,7,8],makefil:[],except:[],add:[],other:[],overview:5,input:[],subsequ:[],transit:[],build:1,ignore_error:[],around:[],xmlrpc:[],mayb:[],handl:[],howto:[],multiprocess:1,tincidunt:[0,2,3,4,6,7,8],camelcas:[],know:5,press:[],scheduledowntim:[],servicebas:[],daemon:1,pure:[],like:5,success:[],arbitrari:[],manual:[],integ:[0,2,3,4,6,7,8],manifest:[],collect:[],api:[1,7],necessari:[],choic:1,output:[],page:[5,1,9],yyyi:[],node:1,www:[],right:[],some:[],back:[],destdir:[],certain:[],understood:[],litter:[],fabric:1,htmloutput:[],respect:[],server:1,librari:[],allcapp:[],forcibl:[],confirm:[],augu:[0,2,3,4,6,7,8],avoid:1,normal:[],pep:[],ultrici:[0,2,3,4,6,7,8],subclass:[],substitut:[],tracker:[],exit:[],prod:[],machin:1,run:1,power:1,quit:1,waitoninput:[],to_addr:[],docstr:[],broken:[],step:1,repositori:[],fulli:[],major:[],"super":1,aenean:[0,2,3,4,6,7,8],panel:[],sshd:1,nagiosbas:[],justo:[0,2,3,4,6,7,8],libero:[0,2,3,4,6,7,8],surround:5,manag:1,quisqu:[0,2,3,4,6,7,8],act:[],commit:[],disabl:[],block:[],own:1,feli:[0,2,3,4,6,7,8],primarili:[],automat:[],suspendiss:[0,2,3,4,6,7,8],down:[],empti:[],strip:[],your:[5,1,9],per:[],praesent:[0,2,3,4,6,7,8],git:[],complianc:[],wai:5,bsb:[],execut:1,fast:1,custom:[],avail:[],start:[5,0,1],appl:5,interfac:[],editor:[],fc14:[],"var":[],styliz:[],"function":[],simplejson:1,eget:[0,2,3,4,6,7,8],forc:[],lint:5,interdum:[0,2,3,4,6,7,8],jbossa:[],loborti:[0,2,3,4,6,7,8],dead:1,uninstal:[],line:5,"true":5,tristiqu:[0,2,3,4,6,7,8],pull:[],succe:[],possibl:[],whether:1,wish:1,jboss:[],maximum:[],record:5,lowercas:[],highlight:[],problem:1,fridg:[],email:[],connect:1,flush:[],featur:[],tasti:5,creat:1,"int":[],lectu:[0,2,3,4,6,7,8],dure:[],rpmbase:[],filenam:[],doesn:1,repres:5,ansil:9,exist:1,file:5,request:[],mauri:[0,2,3,4,6,7,8],curl:[],check:[],urna:[0,2,3,4,6,7,8],conval:[0,2,3,4,6,7,8],echo:[],again:[],outofrot:[],successfulli:[],quot:[],from_addr:[],when:[],detail:[],nam:[0,2,3,4,6,7,8],"default":1,valid:[],preflight:[],futur:[],branch:[],test:[],php5:[],you:[5,0,9,1],roll:[],clojur:1,deseri:[],dapibu:[0,2,3,4,6,7,8],journei:9,intend:[],gravida:[0,2,3,4,6,7,8],tabootscript:[],why:1,asciidoc:[],est:[0,2,3,4,6,7,8],log:[],disablenotif:[],aliquet:[0,2,3,4,6,7,8],lorem:[0,2,3,4,6,7,8],dictumst:[0,2,3,4,6,7,8],sphinx:[],rutrum:[0,2,3,4,6,7,8],tomcat:[],directori:[],descript:[],puppetbas:[],rule:[],functask:[],place:[],ignor:[],potenti:[],time:1,far:1,ligula:[0,2,3,4,6,7,8],fermentum:[0,2,3,4,6,7,8],pellentesqu:[0,2,3,4,6,7,8]},objtypes:{},titles:["Getting Started","Ansible","Modules","Communicate","Playbooks","YAML Scripts","Patterns","API","Examples","Man Pages"],objnames:{},filenames:["gettingstarted","index","modules","communicate","playbooks","YAMLScripts","patterns","api","examples","man"]}) \ No newline at end of file +Search.setIndex({objects:{},terms:{all:5,code:1,donec:[0,2,3,4,6,7,8],mcollect:1,rhoncu:[0,2,3,4,6,7,8],lacu:[0,2,3,4,6,7,8],nunc:[0,2,3,4,6,7,8],vel:[0,2,3,4,6,7,8],blindingli:1,sourc:1,everi:5,fals:5,consequat:[0,2,3,4,6,7,8],veri:1,risu:[0,2,3,4,6,7,8],luctu:[0,2,3,4,6,7,8],level:5,list:[5,1],vivamu:[0,2,3,4,6,7,8],item:5,dotnet:5,saltstack:1,phasellu:[0,2,3,4,6,7,8],ornar:[0,2,3,4,6,7,8],second:5,design:1,eleifend:[0,2,3,4,6,7,8],further:1,index:[],what:[0,1],diam:[0,2,3,4,6,7,8],abl:1,nec:[0,2,3,4,6,7,8],abbrevi:5,ever:1,suscipit:[0,2,3,4,6,7,8],eckersberg:5,leo:[0,2,3,4,6,7,8],valu:5,aliquam:[0,2,3,4,6,7,8],scelerisqu:[0,2,3,4,6,7,8],search:[],larger:1,adipisc:[0,2,3,4,6,7,8],venenati:[0,2,3,4,6,7,8],permit:5,nulla:[0,2,3,4,6,7,8],iaculi:[0,2,3,4,6,7,8],via:1,regardless:[5,1],dictionari:5,accumsan:[0,2,3,4,6,7,8],extra:1,modul:[1,2,9],prefer:1,qui:[0,2,3,4,6,7,8],api:[1,7],instal:1,from:1,tar:1,commun:[1,3],visit:1,two:[5,1],noarch:1,sagitti:[0,2,3,4,6,7,8],until:1,more:1,nequ:[0,2,3,4,6,7,8],sshd:1,indic:[],easiest:1,must:5,join:1,habitass:[0,2,3,4,6,7,8],setup:1,can:[5,1],ero:[0,2,3,4,6,7,8],root:[5,1],employe:5,yamllint:5,ultric:[0,2,3,4,6,7,8],sudo:1,templat:1,knows_oop:5,tag:1,want:1,nullam:[0,2,3,4,6,7,8],alwai:1,newlin:5,puru:[0,2,3,4,6,7,8],lame:5,capistrano:1,write:5,how:0,etiam:[0,2,3,4,6,7,8],simpl:[5,1],arcu:[0,2,3,4,6,7,8],clone:1,usabl:1,tristiqu:[0,2,3,4,6,7,8],mai:1,data:5,parallel:1,man:[1,9],github:1,sit:[0,2,3,4,6,7,8],favorit:1,turpi:[0,2,3,4,6,7,8],element:5,issu:1,mango:5,combin:5,talk:1,help:9,over:1,orang:5,becaus:1,elit:[0,2,3,4,5,6,7,8],rpmbuild:1,comma:5,vita:[0,2,3,4,6,7,8],still:1,overlord:1,group:1,fit:1,yaml:[5,0,1],infrastructur:1,mail:1,sapien:[0,2,3,4,6,7,8],non:[0,1,2,3,4,6,7,8],thei:1,food:5,nibh:[0,2,3,4,6,7,8],egesta:[0,2,3,4,6,7,8],jinja2:1,choic:1,multiprocess:1,name:5,config:1,viverra:[0,2,3,4,6,7,8],porta:[0,2,3,4,6,7,8],separ:5,each:5,metu:[0,2,3,4,6,7,8],auctor:[0,2,3,4,6,7,8],realli:5,backport:1,connect:1,out:5,network:1,content:1,correct:[5,1],hendrerit:[0,2,3,4,6,7,8],base:1,tempu:[0,2,3,4,6,7,8],releas:1,molli:[0,2,3,4,6,7,8],bash:1,care:1,vestibulum:[0,2,3,4,6,7,8],pyyaml:1,indent:5,maecena:[0,2,3,4,6,7,8],thing:1,principl:1,fusc:[0,2,3,4,6,7,8],softwar:1,obviou:1,yourself:1,instruct:1,"long":1,enim:[0,2,3,4,6,7,8],differ:1,script:[5,0,1],associ:5,system:1,grow:1,molesti:[0,2,3,4,6,7,8],john:5,banana:5,option:5,tool:1,specifi:5,quam:[0,2,3,4,6,7,8],than:1,serv:1,provid:5,sollicitudin:[0,2,3,4,6,7,8],structur:5,charact:5,faucibu:[0,2,3,4,6,7,8],uses_cv:5,pre:1,ani:1,ant:[0,2,3,4,6,7,8],download:1,have:1,tabl:[],need:[5,0,1],tellu:[0,2,3,4,6,7,8],paramiko:1,built:1,also:[5,0,1],client:1,massa:[0,2,3,4,6,7,8],build:1,which:1,pulvinar:[0,2,3,4,6,7,8],begin:5,distribut:1,deploy:1,most:5,why:1,porttitor:[0,2,3,4,6,7,8],doc:1,lectu:[0,2,3,4,6,7,8],sodal:[0,2,3,4,6,7,8],likes_emac:5,clojur:1,dolor:[0,2,3,4,6,7,8],someth:1,awesom:1,laoreet:[0,2,3,4,6,7,8],blandit:[0,2,3,4,6,7,8],syntax:[5,0],playbook:[1,4,9],hack:1,involv:1,onli:1,configur:1,should:5,consectetur:[0,2,3,4,6,7,8],variu:[0,2,3,4,6,7,8],variou:1,get:[5,0,1],bibendum:[0,2,3,4,6,7,8],ssh:1,malesuada:[0,2,3,4,6,7,8],requir:1,uvh:1,nisi:[0,2,3,4,6,7,8],nisl:[0,2,3,4,6,7,8],remot:1,cra:[0,2,3,4,6,7,8],orci:[0,2,3,4,6,7,8],wrote:1,view:[1,9],elimin:1,see:[5,0,1],sed:[0,2,3,4,6,7,8],sem:[0,2,3,4,6,7,8],project:1,manpag:9,pattern:[1,6],modularli:1,written:1,languag:[5,1],between:5,irc:1,elementum:[0,2,3,4,6,7,8],kei:5,handful:9,aspir:1,job:5,magna:[0,2,3,4,6,7,8],amet:[0,2,3,4,6,7,8],addit:[5,1],plugin:1,tempor:[0,2,3,4,6,7,8],etc:1,placerat:[0,2,3,4,6,7,8],com:1,proin:[0,2,3,4,6,7,8],overview:5,rpm:1,matti:[0,2,3,4,6,7,8],dui:[0,2,3,4,6,7,8],pretium:[0,2,3,4,6,7,8],morbi:[0,2,3,4,6,7,8],suspendiss:[0,2,3,4,6,7,8],basic:[5,1],feugiat:[0,2,3,4,6,7,8],box:1,rubi:5,vulput:[0,2,3,4,6,7,8],understand:0,pellentesqu:[0,2,3,4,6,7,8],func:1,emploi:5,tortor:[0,2,3,4,6,7,8],"while":1,dictum:[0,2,3,4,6,7,8],erat:[0,2,3,4,6,7,8],sever:5,develop:5,minim:1,make:1,platea:[0,2,3,4,6,7,8],same:5,member:5,python:[5,1],document:[0,1],ansibl:[5,0,9,1],complet:0,pick:1,fruit:5,user:1,extrem:1,distutil:1,squar:5,whole:1,exampl:[1,8],command:1,thi:[5,1],execut:1,less:1,skill:5,ligula:[0,2,3,4,6,7,8],versu:1,hac:[0,2,3,4,6,7,8],simplejson:1,els:1,take:1,ipsum:[0,2,3,4,6,7,8],tincidunt:[0,2,3,4,6,7,8],know:5,daemon:1,like:5,integ:[0,2,3,4,6,7,8],server:1,"boolean":5,velit:[0,2,3,4,6,7,8],manag:1,dead:1,est:[0,2,3,4,6,7,8],avoid:1,ultrici:[0,2,3,4,6,7,8],tracker:1,machin:1,run:1,power:1,quit:1,step:1,repositori:1,"super":1,aenean:[0,2,3,4,6,7,8],about:5,justo:[0,2,3,4,6,7,8],libero:[0,2,3,4,6,7,8],surround:5,page:[5,1,9],quisqu:[0,2,3,4,6,7,8],own:1,"final":5,your:[5,1,9],praesent:[0,2,3,4,6,7,8],git:1,fabric:1,wai:[5,1],interdum:[0,2,3,4,6,7,8],fast:1,avail:1,start:[5,0,1],appl:5,augu:[0,2,3,4,6,7,8],lot:1,form:5,eget:[0,2,3,4,6,7,8],lint:5,loborti:[0,2,3,4,6,7,8],ullamcorp:[0,2,3,4,6,7,8],line:5,"true":5,freenod:1,strawberri:5,whether:1,wish:1,record:5,problem:1,tasti:5,creat:1,doesn:1,repres:5,ansil:9,exist:1,file:[5,1],mauri:[0,2,3,4,6,7,8],ship:9,urna:[0,2,3,4,6,7,8],conval:[0,2,3,4,6,7,8],googl:1,nam:[0,2,3,4,6,7,8],"default":1,bracket:5,futur:1,dignissim:[0,2,3,4,6,7,8],test:1,you:[5,0,9,1],node:1,dapibu:[0,2,3,4,6,7,8],journei:9,gravida:[0,2,3,4,6,7,8],asciidoc:1,feli:[0,2,3,4,6,7,8],aliquet:[0,2,3,4,6,7,8],lorem:[0,2,3,4,6,7,8],dictumst:[0,2,3,4,6,7,8],rutrum:[0,2,3,4,6,7,8],time:1,far:1,fermentum:[0,2,3,4,6,7,8]},objtypes:{},titles:["Getting Started","Ansible","Modules","Communicate","Playbooks","YAML Scripts","Patterns","API","Examples","Man Pages"],objnames:{},filenames:["gettingstarted","index","modules","communicate","playbooks","YAMLScripts","patterns","api","examples","man"]}) \ No newline at end of file diff --git a/html/tasks.html b/html/tasks.html deleted file mode 100644 index 5d2e89e5f7d..00000000000 --- a/html/tasks.html +++ /dev/null @@ -1,1304 +0,0 @@ - - - - - - - - - Tasks — Taboot v0.4.0 documentation - - - - - - - - - - - -
      -
      -
      -
      - -
      -

      Tasks

      -

      All the built-in tasks are documented here.

      -
      -

      Command

      - -

      The command module is used to execute arbitrary commands on a -remote host. The command module has one callable class, that is -the Run class.

      -
      -

      Run

      -
        -
      • API: taboot.tasks.command.Run
      • -
      • Keys
          -
        • command
            -
          • Type: String
          • -
          • Default: None
          • -
          • Required: Yes
          • -
          • Description: The command to run
          • -
          -
        • -
        -
      • -
      -

      Syntax:

      -
      ---
      -  tasks:
      -    # Normal form
      -    - command.Run:
      -        command: command-to-run
      -
      -    # Abbreviated form
      -    - command.Run: {command: command-to-run}
      -
      -

      Example:

      -
      ---
      -- hosts:
      -    - www*
      -  tasks:
      -    - command.Run: {command: yum -y install httpd}
      -
      -
      -
      -
      -

      Service

      - -

      The service module provides interface classes to the system -service command.

      -
      -

      Start

      -
        -
      • API: taboot.tasks.service.Start
      • -
      • Keys
          -
        • service
            -
          • Type: String
          • -
          • Default: None
          • -
          • Required: Yes
          • -
          • Description: The service to start
          • -
          -
        • -
        -
      • -
      -

      Syntax:

      -
      ---
      -  tasks:
      -    # Normal form
      -    - service.Start:
      -        service: service-to-start
      -
      -    # Abbreviated form
      -    - service.Start: {service: service-to-start}
      -
      -

      Example:

      -
      ---
      -- hosts:
      -    - www*
      -  tasks:
      -    - service.Start: {service: httpd}
      -
      -
      -
      -

      Stop

      -
        -
      • API: taboot.tasks.service.Stop
      • -
      • Keys
          -
        • service
            -
          • Type: String
          • -
          • Default: None
          • -
          • Required: Yes
          • -
          • Description: The service to stop
          • -
          -
        • -
        -
      • -
      -

      Syntax:

      -
      ---
      -  tasks:
      -    # Normal form
      -    - service.Stop:
      -        service: service-to-stop
      -
      -    # Abbreviated form
      -    - service.Stop: {service: service-to-stop}
      -
      -

      Example:

      -
      ---
      -- hosts:
      -    - www*
      -  tasks:
      -    - service.Stop: {command: httpd}
      -
      -
      -
      -

      Restart

      -
        -
      • API: taboot.tasks.service.Restart
      • -
      • Keys
          -
        • service
            -
          • Type: String
          • -
          • Default: None
          • -
          • Required: Yes
          • -
          • Description: The service to restart
          • -
          -
        • -
        -
      • -
      -

      Syntax:

      -
      ---
      -  tasks:
      -    # Normal form
      -    - service.Restart:
      -        service: service-to-restart
      -
      -    # Abbreviated form
      -    - service.Restart: {service: service-to-restart}
      -
      -

      Example:

      -
      ---
      -- hosts:
      -    - www*
      -  tasks:
      -    - service.Restart: {command: httpd}
      -
      -
      -
      -
      -

      Puppet

      - -

      The puppet module provides a uniform way interact with the puppet -service. This includes like enabling/disabling the daemon and manually -forcing a catalog run.

      -
      -

      Run

      -
        -
      • API: taboot.tasks.puppet.Run
      • -
      • Keys
          -
        • server
            -
          • Type: String
          • -
          • Default: As specified in /etc/puppet/puppet.conf
          • -
          • Required: No (has default)
          • -
          • Description: Puppet Master to run against
          • -
          -
        • -
        • noop
            -
          • Type: Boolean
          • -
          • Default: False
          • -
          • Required: No (has default)
          • -
          • Description: Make this a “noop”, or “dry-run”
          • -
          -
        • -
        -
      • -
      -
      -

      Note

      -

      See the YAML Basics document for notes on -specifying boolean values.

      -
      -

      The Run class triggers a manual catalog run. This is equivalent to -puppetd --test. This will not abort the release if puppet -returns with a non-zero exit code. You should check out the SafeRun -class if you’re paranoid about that.

      -

      Syntax:

      -
      ---
      -  tasks:
      -    - puppet.Run
      -
      -    # Run against a different puppet master
      -    - puppet.Run: {server: my.puppet.server}
      -    # No operation run
      -    - puppet.Run: {noop: true}
      -
      -

      Example:

      -
      ---
      -- hosts:
      -    - www*
      -  tasks:
      -    - puppet.Run
      -
      ----
      -- hosts:
      -    - www*
      -  tasks:
      -    - puppet.Run: {noop: true, server: puppetmaster01.util.foobar.com}
      -
      -

      -Changed in version 0.2.11: Absolutely will not abort the release if puppet returns -non-zero.

      -

      -Changed in version 0.4.0: Added server and noop keys.

      -
      -
      -

      SafeRun

      - -

      The SafeRun class triggers a manual catalog run. This is -equivalent to puppetd --test. This will abort the release if -puppet returns with a non-zero exit code on systems running puppet -2.6+. You should check out the Run class if you have reasons to -ignore possible puppet errors.

      -

      Syntax:

      -
      ---
      -  tasks:
      -    - puppet.SafeRun
      -
      -    # Run against a different puppet master
      -    - puppet.SafeRun: {server: my.puppet.server}
      -
      -

      Example:

      -
      ---
      -- hosts:
      -    - www*
      -  tasks:
      -    - puppet.SafeRun
      -
      -

      -New in version 0.2.11.

      -
      -
      -

      Enable

      - -

      The Enable class reverses the effect of the disable -class. This removes the lockfile that prevented any automatic or -manual catalog runs from happening before. This is equivalent to -puppetd --enable.

      -

      Syntax:

      -
      ---
      -  tasks:
      -    - puppet.Enable
      -
      -

      Example:

      -
      ---
      -- hosts:
      -    - www*
      -  tasks:
      -    - puppet.Enable
      -
      -
      -
      -

      Disable

      - -

      The Disable class creates a lockfile that prevents puppet from -performing any manual or automatic catalog runs. This is equivalent to -puppetd --disable.

      -

      Syntax:

      -
      ---
      -  tasks:
      -    - puppet.Disable
      -
      -

      Example:

      -
      ---
      -- hosts:
      -    - www*
      -  tasks:
      -    - puppet.Disable
      -
      -
      -
      -

      DeleteLockfile

      - -

      The DeleteLockfile class forcibly deletes a lockfile. You -shouldn’t normally need this but from time to time you may find it -necessary. Try and use the Enable class when at all possible.

      -

      Syntax:

      -
      ---
      -  tasks:
      -    - puppet.DeleteLockfile
      -
      -

      Example:

      -
      ---
      -- hosts:
      -    - www*
      -  tasks:
      -    - puppet.DeleteLockfile
      -
      -
      -
      -
      -

      Nagios

      -
        -
      • API: taboot.tasks.nagios
      • -
      • Classes
          -
        • EnableNotifications
        • -
        • DisableNotifications
        • -
        • ScheduleDowntime
        • -
        • SilenceHost
        • -
        • UnsilenceHost
        • -
        -
      • -
      -

      The nagios task lets you handle notification and set downtime -from your Taboot scripts.

      -

      -Changed in version 0.2.14: The nagios task has switched from a CURL backend using Kerberos -authentication to a pure Func backend. Significant changes include:

        -
      • Previously this task specified the nagios_url key as a URL, -it should now be given as the hostname of the Nagios server. To -facilitate transitions we automatically correct URLs into -hostnames. In the future the name of this key may change.
      • -
      • Previously the service key was defined as a scalar, like “HTTP” -or “JBOSS”. This version accepts that key as a scalar OR as a -list and “does the right thing” in each case.
      • -
      -

      -

      The host identified by the nagios_url key must be a registered -Func minion and it must have the new Func Nagios module installed. You -can download it from the Func git repo (in the func/minion/modules/ -directory) if it is missing from your installation.

      -
      -

      See also

      -

      Func git repo

      -
      -
      -

      EnableAlerts

      - -

      This class enables host alerts for the current host.

      -

      Syntax:

      -
      ---
      -  tasks:
      -    # Normal form
      -    - nagios.EnableAlerts:
      -        nagios_url: nagios-hostname
      -
      -    # Abbreviated form
      -    - nagios.EnableAlerts: {nagios_url: nagios-hostname}
      -
      -

      Example:

      -
      ---
      -- hosts:
      -    - www*
      -  tasks:
      -    - nagios.EnableAlerts: {nagios_url: nagios.example.com}
      -
      -
      -
      -

      DisableAlerts

      - -

      This class disables host alerts for the current host.

      -

      Syntax:

      -
      ---
      -  tasks:
      -    # Normal form
      -    - nagios.DisableAlerts:
      -        nagios_url: nagios-hostname
      -
      -    # Abbreviated form
      -    - nagios.DisableAlerts: {nagios_url: nagios-hostname}
      -
      -

      Example:

      -
      ---
      -- hosts:
      -    - www*
      -  tasks:
      -    - nagios.DisableAlerts: {nagios_url: nagios.example.com}
      -
      -
      -
      -

      ScheduleDowntime

      -
        -
      • API: taboot.tasks.nagios.ScheduleDowntime
      • -
      • Keys
          -
        • nagios_url
            -
          • Type: String
          • -
          • Default: None
          • -
          • Required: Yes
          • -
          • Description: Hostname of the nagios server.
          • -
          -
        • -
        • service
            -
          • Type: String
          • -
          • Default: None
          • -
          • Required: No (has default)
          • -
          • Description: The name of the service to be scheduled for downtime.
          • -
          -
        • -
        • minutes
            -
          • Type: Integer
          • -
          • Default: 30
          • -
          • Required: No (has default)
          • -
          • Description: The number of minutes to schedule downtime for.
          • -
          -
        • -
        -
      • -
      -

      -Changed in version 0.2.14: Default for the minutes key changed from 15 to 30 minutes.

      -

      Syntax:

      -
      ---
      -  tasks:
      -    # Normal form
      -    - nagios.ScheduleDowntime:
      -        nagios_url: nagios-hostname
      -        service: service-to-schedule
      -        minutes: length-of-downtime
      -
      -    # Abbreviated form
      -    - nagios.ScheduleDowntime: {nagios_url: nagios-hostname, service: service-to-schedule, minutes: length-of-downtime}
      -
      -

      Example #1:

      -
      ---
      -- hosts:
      -    - www*
      -  tasks:
      -    - nagios.ScheduleDowntime:
      -        nagios_url: nagios.example.com
      -        service: httpd
      -        minutes: 60
      -
      -

      Example #2:

      -
      ---
      -- hosts:
      -    - www*
      -  tasks:
      -    - nagios.ScheduleDowntime:
      -        nagios_url: nagios.example.com
      -        service: [httpd, git, XMLRPC]
      -        minutes: 60
      -
      -
      -
      -

      SilenceHost

      -
        -
      • API: taboot.tasks.nagios.SilenceHost
      • -
      • Keys
          -
        • nagios_url
            -
          • Type: String
          • -
          • Default: None
          • -
          • Required: Yes
          • -
          • Description: Hostname of the nagios server.
          • -
          -
        • -
        -
      • -
      -

      This class disables all host and service notifications for the current -host.

      -

      Syntax:

      -
      ---
      -  tasks:
      -    # Normal form
      -    - nagios.SilenceHost:
      -        nagios_url: nagios-hostname
      -
      -    # Abbreviated form
      -    - nagios.SilenceHost: {nagios_url: nagios-hostname}
      -
      -

      Example:

      -
      ---
      -- hosts:
      -    - www*
      -  tasks:
      -    - nagios.SilenceHost: {nagios_url: nagios.example.com}
      -
      -

      -New in version 0.3.2.

      -
      -
      -

      UnsilenceHost

      - -

      This class enables all host and service notifications for the current -host.

      -

      Syntax:

      -
      ---
      -  tasks:
      -    # Normal form
      -    - nagios.UnsilenceHost:
      -        nagios_url: nagios-hostname
      -
      -    # Abbreviated form
      -    - nagios.UnsilenceHost: {nagios_url: nagios-hostname}
      -
      -

      Example:

      -
      ---
      -- hosts:
      -    - www*
      -  tasks:
      -    - nagios.UnsilenceHost: {nagios_url: nagios.example.com}
      -
      -

      -New in version 0.3.2.

      -
      -
      -
      -

      Sleep

      - -

      The sleep module is used to halt further task processing for a -specified period of time, or until the user presses enter (as in the -case of WaitOnInput).

      -

      You might use this if you’ve rolled the services on a node and need to -let it build up or sync a cache before you put it back into rotation.

      -

      WaitOnInput can be used when user verification needs to be performed -before proceeding on to another node.

      -
      -

      Seconds

      -
        -
      • API: taboot.tasks.sleep.Seconds
      • -
      • Keys
          -
        • seconds
            -
          • Type: Integer
          • -
          • Default: 60
          • -
          • Required: No (has default)
          • -
          • Description: The number of seconds to halt
          • -
          -
        • -
        -
      • -
      -

      Syntax:

      -
      ---
      -  tasks:
      -    # Normal form
      -    - sleep.Seconds:
      -        seconds: number-of-seconds
      -
      -    # Abbreviated form
      -    - sleep.Seconds: {seconds: number-of-seconds}
      -
      -

      Example:

      -
      ---
      -- hosts:
      -    - www*
      -  tasks:
      -    - service.Restart: {service: jbossas}
      -    - sleep.Seconds: {seconds: 300}
      -
      -
      -
      -

      Minutes

      -
        -
      • API: taboot.tasks.sleep.Minutes
      • -
      • Keys
          -
        • minutes
            -
          • Type: Integer
          • -
          • Default: 1
          • -
          • Required: No (has default)
          • -
          • Description: The number of minutes to halt
          • -
          -
        • -
        -
      • -
      -

      Syntax:

      -
      ---
      -  tasks:
      -    # Normal form
      -    - sleep.Minutes:
      -        minutes: number-of-minutes
      -
      -    # Abbreviated form
      -    - sleep.Minutes: {minutes: number-of-minutes}
      -
      -

      Example:

      -
      ---
      -- hosts:
      -    - java*
      -  tasks:
      -    - service.Restart: {service: jbossas}
      -    - sleep.Minutes: {minutes: 5}
      -
      -
      -
      -

      WaitOnInput

      -
        -
      • API: taboot.tasks.sleep.WaitOnInput
      • -
      • Keys
          -
        • message
            -
          • Type: String
          • -
          • Default: Press enter to continue
          • -
          • Required: No (has default)
          • -
          • Description: The message to prompt the user with
          • -
          -
        • -
        -
      • -
      -

      Syntax:

      -
      ---
      -  tasks:
      -    # Normal form
      -    - sleep.WaitOnInput:
      -        message: message-to-prompt-user
      -
      -    # Abbreviated form
      -    - sleep.WaitOnInput: {message: message-to-prompt-user}
      -
      -

      Example:

      -
      ---
      -- hosts:
      -    - java*
      -  tasks:
      -    - service.Restart: {service: jbossas}
      -    - sleep.WaitOnInput
      -
      -

      -New in version 0.3.2.

      -
      -
      -
      -

      Yum

      - -

      The yum module lets you perform common tasks right in your -Taboot scripts.

      -
      -

      Install

      -
        -
      • API: taboot.tasks.yum.Install
      • -
      • Keys
          -
        • packages
            -
          • Type: List of strings
          • -
          • Default: None
          • -
          • Required: Yes
          • -
          • Description: Names of the packages to install
          • -
          -
        • -
        -
      • -
      -

      Syntax:

      -
      ---
      -  tasks:
      -    # Normal form
      -    - yum.Install:
      -        packages:
      -            - package-name
      -
      -    # Abbreviated form
      -    - yum.Install: {packages: [package-name]}
      -
      -

      Example 1:

      -
      ---
      -- hosts:
      -    - www*
      -  tasks:
      -    - yum.Install: {packages: [httpd, php5, screen]}
      -
      -

      Example 2:

      -
      ---
      -- hosts:
      -    - www*
      -  tasks:
      -    - yum.Install:
      -        packages:
      -            - httpd
      -            - php5
      -            - screen
      -
      -
      -
      -

      Remove

      -
        -
      • API: taboot.tasks.yum.Remove
      • -
      • Keys
          -
        • packages
            -
          • Type: List of strings
          • -
          • Default: None
          • -
          • Required: Yes
          • -
          • Description: Names of packages to remove
          • -
          -
        • -
        -
      • -
      -

      Syntax:

      -
      ---
      -  tasks:
      -    # Normal form
      -    - yum.Remove:
      -        packages:
      -            - package-name
      -
      -    # Abbreviated form
      -    - yum.Remove: {packages: [package-name]}
      -
      -

      Example 1:

      -
      ---
      -- hosts:
      -    - www*
      -  tasks:
      -    - yum.Remove: {packages: [httpd, php5, screen]}
      -
      -

      Example 2:

      -
      ---
      -- hosts:
      -    - www*
      -  tasks:
      -    - yum.Remove:
      -        packages:
      -            - httpd
      -            - php5
      -            - screen
      -
      -
      -
      -

      Update

      -
        -
      • API: taboot.tasks.yum.Update
      • -
      • Keys
          -
        • packages
            -
          • Type: List of strings
          • -
          • Default: Update all packages
          • -
          • Required: No (has default)
          • -
          • Description: Names of packages to update
          • -
          -
        • -
        -
      • -
      -

      Syntax:

      -
      ---
      -  tasks:
      -    # Normal form
      -    - yum.Update:
      -        packages:
      -            - package-name
      -
      -    # Abbreviated form
      -    - yum.Update: {packages: [package-name]}
      -
      -

      Example 1:

      -
      ---
      -- hosts:
      -    - www*
      -  tasks:
      -    - yum.Update: {packages: [httpd, php5, screen]}
      -
      -

      Example 2:

      -
      ---
      -- hosts:
      -    - www*
      -  tasks:
      -    - yum.Update:
      -        packages:
      -            - httpd
      -            - php5
      -            - screen
      -
      -
      -
      -
      -

      RPM

      - -

      The RPM module provides two utility classes used to create a log -of any RPMs installed on the target system that were changed during -the Taboot run.

      -
      -

      PreManifest

      - -

      The PreManifest class is best ran at the beginning of a tasks -block. When ran it saves the output of rpm -qa | sort on each of -the target machine locally. This is only useful if the -PostManifest class is called at the end of the Taboot script.

      -

      Syntax:

      -
      ---
      -  tasks:
      -    - rpm.PreManifest
      -
      -

      Example:

      -
      ---
      -- hosts:
      -    - www*
      -  tasks:
      -    - rpm.PreManifest
      -    - puppet.Run
      -    - rpm.PostManifest
      -
      -
      -
      -

      PostManifest

      - -

      The PostManifest class is best ran at the end of a tasks -block. When ran it will show a diff of the packages installed between -when PreManifest was ran and when PostManifest is called.

      -

      This is really useful for checking that planned updates are happening -in a Taboot script if they are supposed to be. There might be -package updates happening if you’re doing a manual puppet catalog run, -or are triggering some other kind of automatic package updating -utility. Maybe your script is as simple as a PreManifest, then a -command.Run that just runs yum -y update, and ends with a -PostManifest.

      -

      Syntax:

      -
      ---
      -  tasks:
      -    - rpm.PostManifest
      -
      -

      Example:

      -
      ---
      -- hosts:
      -    - www*
      -  tasks:
      -    - rpm.PreManifest
      -    - puppet.Run
      -    - rpm.PostManifest
      -
      -
      -
      -

      Example PostManifest Output

      -

      These classes might be described best by showing a complete example.

      -

      Here is the YAML file (mercurial-update.yaml) that’s going to be -run:

      -
      ---
      -- hosts:
      -    - fridge
      -  tasks:
      -    - rpm.PreManifest
      -    - yum.Update: {packages: [mercurial]}
      -    - rpm.PostManifest
      -
      -

      This is what the output looks like. The last two lines show the -packages that changed during the Taboot run:

      -
      [root@fridge yamls]# taboot mercurial-update.yaml
      -fridge.bsb.local:
      -2011-04-04 21:04:09 Starting Task[taboot.tasks.rpm.PreManifest('rpm -qa | sort',)]
      -fridge.bsb.local:
      -2011-04-04 21:04:12 Finished Task[taboot.tasks.rpm.PreManifest('rpm -qa | sort',)]:
      -
      -fridge.bsb.local:
      -2011-04-04 21:04:12 Starting Task[taboot.tasks.yum.Update('yum update -y mercurial',)]
      -fridge.bsb.local:
      -2011-04-04 21:04:34 Finished Task[taboot.tasks.yum.Update('yum update -y mercurial',)]:
      -
      -# yum.Update output here...
      -
      -fridge.bsb.local:
      -2011-04-04 21:04:34 Starting Task[taboot.tasks.rpm.PostManifest('rpm -qa | sort',)]
      -fridge.bsb.local:
      -2011-04-04 21:04:37 Finished Task[taboot.tasks.rpm.PostManifest('rpm -qa | sort',)]:
      -- mercurial-1.7.5-1.fc14.x86_64
      -+ mercurial-1.8.1-2.fc14.x86_64
      -
      -
      -
      -
      -

      AJP

      - -

      The AJP module provides a uniform way to put nodes into and out of -rotation in a mod_jk AJP balancer. This module is a great -replacement for manually adding and removing nodes in a jkmanage -management panel.

      -
      -

      Note

      -

      This module requires that the taboot-func package is installed -on the target AJP balancers.

      -
      -
      -

      Note

      -

      This module is very specific to the original authors needs and may -not work outside of that environment without customization.

      -
      -
      -

      See also

      -
      -
      The Apache Tomcat Connector - LoadBalancer HowTo
      -
      Documentation on the Apache Tomcat Connector
      -
      -
      -
      -

      InRotation

      -
        -
      • API: taboot.tasks.mod_jk.InRotation
      • -
      • Keys
          -
        • proxies
            -
          • Type: List of strings
          • -
          • Default: None
          • -
          • Required: Yes
          • -
          • Description: List of AJP proxy hostnames
          • -
          -
        • -
        -
      • -
      -

      The InRotation class puts an AJP node back into rotation.

      -

      Syntax:

      -
      ---
      -  tasks:
      -    - mod_jk.InRotation:
      -        proxies:
      -            - proxy-hostname
      -
      -

      Example:

      -
      ---
      -- hosts:
      -    - tomcat*.int.company.com
      -  tasks:
      -    - mod_jk.InRotation:
      -        proxies:
      -            - proxyjava01.web.prod.ext.example.com
      -            - proxyjava02.web.prod.ext.example.com
      -
      -
      -
      -

      OutOfRotation

      - -

      The OutOfRotation class takes an AJP node out of rotation.

      -

      Syntax:

      -
      ---
      -  tasks:
      -    - mod_jk.OutOfRotation:
      -        proxies:
      -            - proxy-hostname
      -
      -

      Example:

      -
      ---
      -- hosts:
      -    - tomcat*.int.company.com
      -  tasks:
      -    - mod_jk.OutOfRotation:
      -        proxies:
      -            - proxyjava01.web.prod.ext.example.com
      -            - proxyjava02.web.prod.ext.example.com
      -
      -
      -
      -
      -

      Misc

      -
        -
      • API: taboot.tasks.misc
      • -
      • Classes
          -
        • Noop
        • -
        • Echo
        • -
        -
      • -
      -

      The misc module has two simple tasks in it: Noop and -Echo. They are primarily intended for instruction and as -placeholders while testing scripts or major code changes.

      -
      -

      Noop

      -
        -
      • API: taboot.tasks.misc.Noop
      • -
      -

      Syntax:

      -
      ---
      -  tasks:
      -    - misc.Noop
      -
      -

      Example:

      -
      ---
      -- hosts:
      -    - www*
      -  tasks:
      -    - misc.Noop
      -
      -

      This is a generic task that litterally does nothing.

      -
      -
      -

      Echo

      -
        -
      • API: taboot.tasks.misc.Echo
      • -
      • Keys
          -
        • input
            -
          • Type: String
          • -
          • Default: None
          • -
          • Required: Yes
          • -
          • Description: String to echo back
          • -
          -
        • -
        -
      • -
      -

      Syntax:

      -
      ---
      -  tasks:
      -    # Normal form
      -    - misc.Echo:
      -        input: string
      -
      -    # Abbreviated form
      -    - misc.Echo: {input: string}
      -
      -

      Example 1:

      -
      ---
      -- hosts:
      -    - www*
      -  tasks:
      -    - misc.Echo: {input: "Taboot Rules!"}
      -
      -

      Example 2:

      -
      ---
      -- hosts:
      -    - www*
      -  tasks:
      -    - misc.Echo:
      -        input: "Taboot Rules!"
      -
      -

      -New in version 0.4.0.

      -
      -
      -
      - - -
      -
      -
      -
      -
      -

      Table Of Contents

      - - -

      This Page

      - - - -
      -
      -
      -
      - - - - \ No newline at end of file diff --git a/index.html b/index.html index 39457113a1c..41fbffbb548 100644 --- a/index.html +++ b/index.html @@ -1,15 +1,12 @@ ---- -layout: default -title: Ansible - Multi-node SSH Command & Control ---- - -
      - -

      About Ansible

      - - -
      + + + Redirecting to the Ansible Documentation... + + + +

      + Click this link if you are + not automatically forwarded. +

      + + diff --git a/rst/index.rst b/rst/index.rst index 30d8bb14e2c..9af75f428bd 100644 --- a/rst/index.rst +++ b/rst/index.rst @@ -50,22 +50,57 @@ Requirements are extremely minimal. If you are running python 2.6 on the **overlord** machine, you will need: -* paramiko -* python-jinja2 -* PyYAML (if using playbooks) +* ``paramiko`` +* ``PyYAML`` +* ``Asciidoc`` (for building documentation) -If you are running less than Python 2.6, you will also need +If you are running less than Python 2.6, you will also need: -* the Python 2.4 or 2.5 backport of the multiprocessing module -* simplejson +* The Python 2.4 or 2.5 backport of the multiprocessing module + * `Installation and Testing Instructions `_ +* ``simplejson`` On the managed nodes, to use templating, you will need: -* python-jinja2 (you can install this with ansible) +* ``python-jinja2`` (you can install this with ansible) +Getting Ansible +``````````````` -Contents: +Tagged releases are available as tar.gz files from the Ansible github +project page: + +* `Ansible/downloads `_ + +You can also clone the git repository yourself and install Ansible in +one of two ways: + + +Python Distutils +++++++++++++++++ + +You can install Ansible using Python Distutils:: + + $ git clone git://github.com/ansible/ansible.git + $ cd ./ansible + $ sudo make install + + +Via RPM ++++++++ + +In the future, pre-built RPMs may be available. Until that time you +can use the ``make rpm`` command:: + + $ git clone git://github.com/ansible/ansible.git + $ cd ./ansible + $ make rpm + $ sudo rpm -Uvh ~/rpmbuild/RPMS/noarch/ansible-1.0-1.noarch.rpm + + +Contents +======== .. toctree:: :maxdepth: 3 @@ -75,15 +110,17 @@ Contents: patterns modules playbooks + examples api communicate - examples man -Indices and tables -================== -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` +Communicate or Get Involved +=========================== + +* Join the `ansible-project mailing list `_ on Google Groups +* Join `#ansible `_ on the `freenode IRC network `_ +* Visit the `project page `_ on Github + - View the `issue tracker `_ diff --git a/rst/man.rst b/rst/man.rst index 6c6497fc930..d25477bf110 100644 --- a/rst/man.rst +++ b/rst/man.rst @@ -5,12 +5,17 @@ Man Pages Ansile ships with a handfull of manpages to help you on your journey. -taboot(1) ---------- +ansible(1) +---------- -`View taboot.1 `_ +* `View ansible.1 `_ -taboot-tasks(5) ---------------- +ansible-modules(5) +------------------ -`View taboot-tasks.5 `_ +* `View ansible-modules.5 `_ + +ansible-playbook(5) +------------------- + +* `View ansible-playbook.5 `_