taboot-tasks man page

taboot-tasks — quick reference for the built in tasks


Taboot is a tool written for scripting and automating the task of performing software releases in a large-scale infrastructure. Release scripts are written using YAML syntax.

Taboot tasks are pre-written actions to perform on a given host. For example, scheduling downtime in Nagios, or updating all the RPMs on a system. The tasks documented here can be used in preflight and tasks blocks. The syntax of each possible tasks varies. Taboot comes with many built-in tasks.

This quick-reference is example based and only uses abbreviated forms where possible. Additionally, the options for the output block are provided.


The output block lets you choose zero or more methods to log the taboot run. The CLIOutput method is the default. See the online documentation to learn how to set system-wide defaults for the HTMLOutput logger.

- hosts: [www0*]
    # CLIOutput is the default
    - CLIOutput
    # You can also log to a file, 'taboot-YYYY-MM-DD-HHMMSS.log' is
    # the default format
    - LogOutput
    # The 'logfile' keyword lets you choose a different name
    - LogOutput: {logfile: update-httpd.log}
    # Log to an HTML file ('taboot-%s.html')
    - HTMLOutput
    # As above, but put the logfile in the webservers log directory
    - HTMLOutput: {destdir: /var/www/html/logs}
    # HTML output again, but with a named file
    - HTMLOutput: {logfile: update-httpd.html}
    # HTML output where *%s* is substituted with a datestamp in the
    # form YYYY-MM-DD-HHMMSS
    - HTMLOutput: {logfile: update-httpd-%s.html}


The Command class lets you run arbitrary commands on the remote host.

- hosts: [www0*]
    # Install httpd on all matching hosts
    - command.Run: {command: yum -y install httpd}


The Service class provides an interface to the system service command.

- hosts: [www0*]
    # Start httpd on all matching hosts
    - service.Start: {service: httpd}
    # Stop httpd on all matching hosts
    - service.Stop: {service: httpd}
    # Restart httpd on all matching hosts
    - service.Restart: {service: httpd}


The Puppet class provides a uniform way to interact with the puppet service. This includes enabling/disabling the daemon and manually forcing a catalog run.

- hosts: [www0*]
    # Enable puppet
    - puppet.Enable
    # Disable puppet
    - puppet.Disable
    # Delete that stubborn lockfile
    - puppet.DeleteLockfile
    # Test run
    - puppet.Run
    # Test run with specified server
    - puppet.Run: {server: my.puppet.server}
    # No operation run
    - puppet.Run: {noop: true}
    # Do a paranoid test run (quit Taboot on possible errors)
    - puppet.SafeRun
    # Do a paranoid test run with specified server
    - puppet.SafeRun: {server: my.puppet.server}
    # Do a noop (dry-run)
    - puppet.Run: {noop: True}


The Nagios class lets you handle notifications and set downtime from your Taboot scripts.

- hosts: [www0*]
    # Disable alerts for all matching hosts
    - nagios.DisableAlerts:
    # Enable alerts for all matching hosts
    - nagios.EnableAlerts:
    # Schedule a 60 minute downtime for httpd, git and XMLRPC on
    # all matching hosts
    - nagios.ScheduleDowntime:
        service: [httpd, git, XMLRPC]
        minutes: 60
    # Silence all host and service notifications
    - nagios.SilenceHost:
    # Unsilence all host and service notifications
    - nagios.UnsilenceHost:


The Sleep class is used to halt further task processing for a specified period of time.

- hosts: [www0*]
    # Pauses execution for 5 minutes
    - sleep.Seconds: {seconds: 300}
    # Also pauses execution for 5 minutes
    - sleep.Minutes: {minutes: 5}
    # Pauses execution until the user presses Enter
    - sleep.WaitOnInput
    # Also pauses execution until user presses Enter
    # but also allows you to override the message prompt
    - sleep.WaitOnInput: {message: "This is the user prompt:"}


The Yum class lets you install, remove, and update RPMs right in your Taboot scripts.

- hosts: [www0*]
    # Install three packages
    - yum.Install: {packages: [httpd, php5, screen]}
    # Remove the same three packages
    - yum.Remove: {packages: [httpd, php5, screen]}
    # Update the same three packages
    - yum.Update: {packages: [httpd, php5, screen]}


The RPM class provides two utility actions that, when used together, report any RPMs that changed between the PreManifest and PostManifest.

- hosts: [www0*]
    # Take a PreManifest of all installed packages
    - rpm.PreManifest
    # Use yum to update all the system RPMs.
    - yum.Update
    # Take a PostManifest and diff it against the PreManifest
    # The diff is printed after PostManifest finishes running.
    - rpm.PostManifest


The AJP class 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.

- hosts: [tomcat*]
    # Take the matching node out of rotation
    - mod_jk.OutOfRotation:
    # Do stuff....
    # do more stuff...
    # Put the node back into the pool
    - mod_jk.InRotation:


The MISC class 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.

- hosts: [www0*]
    # Do nothing
    - misc.Noop
    # Echo back the 'input'
    - misc.Echo: {input: "Taboot Rules!"}


Taboot was originally written by John Eckersberg. Tim Bielawa is the current maintainer. See the AUTHORS file for a complete list of contributors.

See Also

taboot(1), func(1)

Taboot home page:

HTML Docs:

Referenced By


01/12/2012 Taboot 0.4.x