Michael DeHaan
be4cb64c92
Relicensing to GPLv3, all previous committers ok'd on mailing list.
2012-02-28 19:08:09 -05:00
Michael DeHaan
1caafb7bd9
Stop evaluating a host in a playbook when it encounters the first failure.
2012-02-27 22:28:01 -05:00
Seth Vidal
85f751175d
- make tmp_path be a dir so we can put more than one command in there securely
2012-02-27 17:52:37 -05:00
Seth Vidal
bd7a71bb29
implement manual multiprocessing pools for the runner.
...
this fixes the ctrl-c not-working problem.
implemented this solution: http://www.bryceboe.com/2010/08/26/python-multiprocessing-and-keyboardinterrupt/#georges
also add hosts which do not get a chance to return results to the 'dark' results.
2012-02-27 00:43:02 -05:00
Seth Vidal
1a20b00d1f
If the error is an authentication exception - just report it that way don't dump out an unappetizing traceback which just says the same
2012-02-26 22:59:45 -05:00
Michael DeHaan
f7cff27f3d
Drastically simply playbook syntax
2012-02-26 20:54:51 -05:00
Michael DeHaan
fc4ba46d1a
Add a ton of comments so folks can understand what runner does. More refactoring is
...
certaintly possible too.
2012-02-26 20:29:27 -05:00
Michael DeHaan
c0ac0e9b62
Added comments to explain the playbook code.
2012-02-26 20:18:42 -05:00
Michael DeHaan
78a254fc52
In playbooks, each pattern stanza can reference it's own user to run as, so you can
...
run things as multiple sets of users (if you want) in the same playbook.
2012-02-26 19:58:56 -05:00
Michael DeHaan
61d064d011
Fixed up KV munging in runner, misc fixes to copy, setup, and template modules
2012-02-26 19:55:26 -05:00
Michael DeHaan
e5f62f20b1
make copy & template module take key/value parameters so we're consistent. Only the command
...
module works differently now
starter manpage for modules
allow template file location to be passed into template & setup modules
2012-02-26 19:21:44 -05:00
Michael DeHaan
deb71da91e
trim md5sum string so it does not contain the filename
...
also fix a bug/typo in the reporting from playbook
2012-02-26 12:10:57 -05:00
Michael DeHaan
d308254eae
A basic service module with 'ensure' idempotence semantics. Playbook updated to use service
...
module vs command module for restarting. May be some bugs and requires the service to implement 'status' -- and probably some better error handling (i.e. return JSON with "failed" element if failed).
Improvements welcome.
2012-02-25 20:27:11 -05:00
Michael DeHaan
cb90df2377
Allow multiple patterns to specified, just like Func did.
2012-02-25 17:22:48 -05:00
Michael DeHaan
b44ae0af90
applying indentation patch from skvidal
2012-02-25 17:16:23 -05:00
Michael DeHaan
a5039eec62
Update reporting on playbook runs.
2012-02-25 15:21:11 -05:00
Michael DeHaan
79fdc1b6f4
Notifable handlers only run when something is changed. Awesome.
2012-02-25 14:42:41 -05:00
Michael DeHaan
de80166b6d
Misc refactoring, updated TODO to reflect new templating features being completed
2012-02-05 13:25:10 -05:00
Michael DeHaan
ba9468266f
Can it get an easier? Yes it can! Further simply playbook format.
2012-02-05 13:05:09 -05:00
Michael DeHaan
6d0fd2bfde
Compress the playbook format for readability
2012-02-05 12:52:07 -05:00
Michael DeHaan
b053df4182
Some refactoring of runner.py -- more to come to eliminate repeated code
2012-02-05 12:48:52 -05:00
Michael DeHaan
6cceaa5f6a
Implment copy with an actual minion-side module such that we can get md5sum's and
...
onchange events like Puppet's file providers do.
2012-02-24 05:15:28 -05:00
Michael DeHaan
440bac4a95
Added remote templating engine using jinja2, see examples/playbook.yml for usage.
...
Cleanup is due in runner.py
2012-02-24 04:35:51 -05:00
Michael DeHaan
5d6b0280d5
Added stub for template execution, WIP.
2012-02-24 03:45:36 -05:00
Seth Vidal
160470bc49
- add match_hosts() method to runner.Runner()
...
- add pattern parameter to self._matches() and match_hosts() so you can query
for matches against the host list
- these are useful when writing scripts and you want to tell the user
what hosts you will be running on before actually executing anything.
2012-02-25 01:06:18 -05:00
Seth Vidal
e7bb41ff89
simple logging setup using logger.
...
/usr/bin/logger should probably be a constant or defined in some sort of config as well as the log priority
2012-02-24 23:25:30 -05:00
Michael DeHaan
e25bb2f888
Upgrade output for playbook runs
2012-02-24 02:36:38 -05:00
Michael DeHaan
ee2fa721f1
Kinda have to pass the host list parameter
2012-02-24 02:14:22 -05:00
Michael DeHaan
43f7dee247
Added rough sketch of what I want for playbook support. Debug heavy at the moment
...
as I figure out how logging/output might look. A couple of major TODO features
also listed in the file.
2012-02-24 01:02:24 -05:00
Michael DeHaan
d079c8e5f3
Move runner out of __init__.py so it's clear what classes live where.
2012-02-23 23:28:58 -05:00
Michael DeHaan
6eda2cf383
Added initial stub for where playbooks will go, moved to common
...
constants file so as to not repeat constants between CLI and lib.
2012-02-23 23:26:16 -05:00
Michael DeHaan
b2e8084c50
Merge pull request #4 from skvidal/master
...
adds an option to ask for and store the ssh password from the cli
2012-02-24 15:27:19 -08:00
Seth Vidal
08b45d6da1
add support to prompt for ssh password on the cli
2012-02-24 18:13:11 -05:00
Jeremy Katz
25df80ff58
Use a mktemp'd path for uploading modules
2012-02-24 15:51:16 -05:00
Michael DeHaan
bd37864242
Comments and fixup on the dark/contacted code
2012-02-23 23:00:37 -05:00
Michael DeHaan
11f7930038
trim unused modules
2012-02-23 22:54:01 -05:00
Michael DeHaan
7be8d134c9
Rename 'successful' to 'contacted' ...
2012-02-23 22:47:03 -05:00
Michael DeHaan
530e54b3e4
Fix multiprocessing pool usage and remove stackoverflow hack
2012-02-23 22:38:51 -05:00
Michael DeHaan
7ce5db97ed
Add explicit calls to close connections
2012-02-23 22:10:34 -05:00
Michael DeHaan
e0e98d10ce
use readlines on stdout so we'll block on long running commands
2012-02-23 22:09:23 -05:00
Michael DeHaan
7eb2dd2dee
Add remote setting to file, update TODO
2012-02-23 22:04:09 -05:00
Michael DeHaan
3da6370a65
use defaults better, improve/fix setup.py
2012-02-23 21:37:39 -05:00
Michael DeHaan
9681e1fa04
Add MIT license headers
2012-02-23 19:42:05 -05:00
Michael DeHaan
3807824c6d
Added file copy support w/ readme updates
2012-02-23 16:07:10 -05:00
Michael DeHaan
145a024d7b
Split CLI into binscript
2012-02-23 14:56:14 -05:00
Michael DeHaan
f31421576b
Genesis.
2012-02-23 14:17:24 -05:00