1TABOOT-TASKS(5)                     Taboot                     TABOOT-TASKS(5)
2
3
4

NAME

6       taboot-tasks - quick reference for the built in tasks
7

DESCRIPTION

9       Taboot is a tool for written for scripting and automating the task of
10       performing software releases in a large-scale infrastructure. Release
11       scripts are written using YAML syntax.
12
13       Taboot tasks are pre-written actions to perform on a given host. For
14       example, scheduling downtime in Nagios, or updating all the RPMs on a
15       system. The tasks documented here can be used in preflight and tasks
16       blocks. The syntax of each possible tasks varies. Taboot comes with
17       many built-in tasks.
18
19       This quick-reference is example based and only uses abbreviated forms
20       where possible. Additionally, the options for the Output block are
21       provided.
22

OUTPUT

24       The output block lets you choose zero or more methods to log the taboot
25       run. The CLIOutput method is the default. See the online documentation
26       to learn how to set system-wide defaults for the HTMLOutput logger.
27
28           ---
29           - hosts: [www0*.company.com]
30             output:
31               # CLIOutput is the default
32               - CLIOutput
33               # You can also log to a file, 'taboot.log' is the default name
34               - LogOutput
35               # The 'logfile' keyword lets you choose a different name
36               - LogOutput: {logfile: update-httpd.log}
37               # Log to an HTML file ('taboot-%s.html')
38               - HTMLOutput
39               # As above, but put the logfile in the webservers log directory
40               - HTMLOutput: {destdir: /var/www/html/logs}
41               # HTML output again, but with a named file
42               - HTMLOutput: {logfile: update-httpd.html}
43               # HTML output where *%s* is substituted with a datestamp in the
44               # form YYYY-MM-DD-HHMMSS
45               - HTMLOutput: {logfile: update-httpd-%s.html}
46

COMMAND

48       The Command task lets you run arbitrary commands on the remote host.
49
50           ---
51           - hosts: [www0*.company.com]
52             tasks:
53               # Install httpd on all matching hosts
54               - command.Run: {command: yum -y install httpd}
55

SERVICE

57       The Service task provides an interface to the system service command.
58
59           ---
60           - hosts: [www0*.company.com]
61             tasks:
62               # Start httpd on all matching hosts
63               - service.Start: {service: httpd}
64               # Stop httpd on all matching hosts
65               - service.Stop: {service: httpd}
66               # Restart httpd on all matching hosts
67               - service.Restart: {service: httpd}
68

PUPPET

70       The Puppet task provides a uniform way to interact with the puppet
71       service. This includes enabling/disabling the daemon and manually
72       forcing a catalog run.
73
74           ---
75           - hosts: [www0*.company.com]
76             tasks:
77               # Enable puppet
78               - puppet.Enable
79               # Disable puppet
80               - puppet.Disable
81               # Delete that stubborn lockfile
82               - puppet.DeleteLockfile
83               # Test run
84               - puppet.Run
85               # Do a paranoid test run (quit Taboot on possible errors)
86               - puppet.SafeRun
87

NAGIOS

89       The Nagios task lets you handle notifications and set downtime from
90       your Taboot scripts.
91
92           ---
93           - hosts: [www0*.company.com]
94             tasks:
95               # Disable alerts for all matching hosts
96               - nagios.DisableAlerts:
97                   nagios_url: nagios.example.com
98               # Enable alerts for all matching hosts
99               - nagios.EnableAlerts:
100                   nagios_url: nagios.example.com
101               # Schedule a 60 minute downtime for httpd, git and XMLRPC on
102               # all matching hosts
103               - nagios.ScheduleDowntime:
104                   nagios_url: nagios.example.com
105                   service: [httpd, git, XMLRPC]
106                   minutes: 60
107               # Silence all host and service notifications
108               - nagios.SilenceHost:
109                   nagios_url: nagios.example.com
110               # Unsilence all host and service notifications
111               - nagios.UnsilenceHost:
112                   nagios_url: nagios.example.com
113

SLEEP

115       The Sleep task is used to halt further task processing for a specified
116       period of time.
117
118           ---
119           - hosts: [www0*.company.com]
120             tasks:
121               # Pauses execution for 5 minutes
122               - sleep.Seconds: {seconds: 300}
123               # Also pauses execution for 5 minutes
124               - sleep.Minutes: {minutes: 5}
125               # Pauses execution until the user presses Enter
126               - sleep.WaitOnInput
127               # Also pauses execution until user presses Enter
128               # but also allows you to override the message prompt
129               - sleep.WaitOnInput: {message: "This is the user prompt:"}
130

YUM

132       The Yum task lets you install, remove, and update RPMs right in your
133       Taboot scripts.
134
135           ---
136           - hosts: [www0*.company.com]
137             tasks:
138               # Install three packages
139               - yum.Install: {packages: [httpd, php5, screen]}
140               # Remove the same three packages
141               - yum.Remove: {packages: [httpd, php5, screen]}
142               # Update the same three packages
143               - yum.Update: {packages: [httpd, php5, screen]}
144

RPM

146       The RPM task provides two utility actions that, when used together,
147       report any RPMs that changed between the PreManifest and PostManifest.
148
149           ---
150           - hosts: [www0*.company.com]
151             tasks:
152               # Take a PreManifest of all installed packages
153               - rpm.PreManifest
154               # Use yum to update all the system RPMs.
155               - yum.Update
156               # Take a PostManifest and diff it against the PreManifest
157               # The diff is printed after PostManifest finishes running.
158               - rpm.PostManifest
159

AJP

161       The AJP task provides a uniform way to put nodes into and out of
162       rotation in a mod_jk AJP balancer. This module is a great replacement
163       for manually adding and removing nodes in a jkmanage management panel.
164
165           ---
166           - hosts: [tomcat*.int.company.com]
167             tasks:
168               # Take the matching node out of rotation
169               - mod_jk.OutOfRotation:
170                   proxies:
171                       - proxyjava01.web.prod.int.example.com
172                       - proxyjava02.web.prod.int.example.com
173               # Do stuff....
174               # do more stuff...
175               # Put the node back into the pool
176               - mod_jk.InRotation:
177                   proxies:
178                       - proxyjava01.web.prod.int.example.com
179                       - proxyjava02.web.prod.int.example.com
180

AUTHOR

182       Taboot was originally written by John Eckersberg. Tim Bielawa is the
183       current maintainer. See the AUTHORS file for a complete list of
184       contributors.
185
187       Copyright © 2009-2011, Red Hat, Inc
188
189       Taboot is released under the terms of the GPLv3+ license.
190

SEE ALSO

192       taboot(1), func(1)
193
194       Taboot home page: https://fedorahosted.org/Taboot/
195
196       HTML Docs:
197       http://people.redhat.com/~tbielawa/taboot/docs/taboot-latest/tasks.html
198
199
200
201Taboot 0.3.x                      09/29/2011                   TABOOT-TASKS(5)
Impressum