Michael DeHaan
c71afe35d6
Async tests complete. Fixed bug in async_wrapper
2012-04-04 11:30:14 -04:00
Michael DeHaan
fae3a71899
WIP on async tests
2012-04-04 11:24:22 -04:00
Michael DeHaan
f8eab8ed7e
Here are those tests I talked about previously :)
2012-04-04 11:11:31 -04:00
Michael DeHaan
369b9cde1c
Add test for template module and make 'dark' errors clearer if we get output back and the JSON
...
is not parseable
2012-04-04 10:57:54 -04:00
Michael DeHaan
c86b388812
Strip trailing newlines from command module, which happens in some shell commands
2012-04-04 10:30:22 -04:00
Michael DeHaan
8d06c074b1
* Added uptime.py as an example of somewhat minimal API usage & reporting
...
* Pattern in API now has a default
* Fixed bug in template module operation detected from running playbook (tests for that pending)
* Workaround for multiprocessing lib being harmlessly squeaky (feeder thread got sentinel)
2012-04-04 10:27:24 -04:00
Michael DeHaan
05c5c85276
Added tests for the guts of the program (Runner()) and modules. Idea is to run
...
everything as the logged in user using local checkout and write to a tempdir.
To run tests, be sure user is in SSH authorized_keys for themselves, this DOES
run through paramiko because mocking it out would defeat the point of having tests.
2012-04-04 09:16:11 -04:00
Tim Bielawa
e9ae5eb9d5
Correct see-also in playbook manpage
2012-03-04 23:08:29 -05:00
Michael DeHaan
db57933614
Allow ":" to be used to split patterns as well as ";" so if you are just using group names or fully explicit names you do not need to use shell quoting at all. Obviously if you use wildcards like "*" you wouldstill.
2012-03-03 14:26:59 -05:00
Michael DeHaan
c839229f54
Fix code formatting in README.md
2012-03-03 14:20:58 -05:00
Michael DeHaan
269a6d46d6
attempt to explain import syntax in ansible-playbook manpage. Can't include
...
examples inline because github won't display them well, want to move this
file to markdown soon.
2012-03-03 14:13:31 -05:00
Michael DeHaan
defb91ae4d
README updates
2012-03-03 14:06:15 -05:00
Michael DeHaan
6a0b793578
Remove debug comments
2012-03-03 13:42:37 -05:00
Michael DeHaan
8e07d83ad1
Async module, mostly operational, daemonizing/watch code may have bugs
2012-03-03 13:19:33 -05:00
Michael DeHaan
718e2930b2
async module now forks
2012-03-03 13:06:43 -05:00
Michael DeHaan
45c40524ef
Time limit needs to be passed to async_wrapper.
2012-03-03 12:47:31 -05:00
Michael DeHaan
a06d8859fa
Added start of async_status script.
...
Parameters:
jid=X
mode=status|cleanup (default status)
status = returns results from the job
cleanup = deletes the job file, should also kill the job if still running (TODO)
2012-03-03 12:41:22 -05:00
Michael DeHaan
eaa7714ff8
Laying the groundwork for async mode, async status script still needs to be done, and async_wrapper
...
still needs to daemonize. Then, once done, playbook can be taught how to poll async within the
timing window.
2012-03-03 12:25:56 -05:00
Michael DeHaan
1ed212513c
Add user to playbook example so it's clear that this is available
2012-03-03 11:02:14 -05:00
Michael DeHaan
ab408b0000
Ability to import task lists and handler lists from a top level playbook file. It is possible
...
to use multiple import statements to implement 'class' like behavior, and also to share
a common list of handlers between multiple patterns.
2012-03-03 10:53:15 -05:00
Michael DeHaan
32c32abb4a
Update AUTHORS
2012-03-02 23:12:43 -05:00
Michael DeHaan
1c2d31ef85
add info about the 'all' group to README.md
2012-03-02 23:02:17 -05:00
Michael DeHaan
cbfabcd0fb
Add -i, -k, and -M to ansible-playbook CLI to match options in /usr/bin/ansible
2012-03-02 22:54:25 -05:00
Michael DeHaan
e4304a0ac5
Make sure tempdirs are cleaned up after execution steps, fix notifiers, make sure
...
service module is installed by setup.py
2012-03-02 22:38:55 -05:00
Michael DeHaan
6541f338df
add pyflakes target & associated fixes. Also decided to save JSON to --tree file so it can
...
be better used programatically. May have to come up with another system of tree logging for
playbook if playbook decides to have tree logging. Presumably not the highest priority.
2012-03-02 22:10:51 -05:00
Michael DeHaan
3ad9db4966
Some minor from 'pep8', and silencing the PEP8 messages I don't care about.
...
Also make pep8 show all messages rather than just 1 per code.
2012-03-02 22:03:03 -05:00
Michael DeHaan
0d7a84d591
Some minor refactoring of playbook code, more to go.
2012-03-02 21:43:46 -05:00
Michael DeHaan
c57df6220b
Add pydoc to playbook binary, fix default types for playbook '.get()' call
2012-03-02 21:20:37 -05:00
Michael DeHaan
34cbbfbfe1
Added pydoc for utils.py
2012-03-02 21:16:29 -05:00
Michael DeHaan
bf967adf83
Added pydoc for functions in Cli()
2012-03-02 21:11:43 -05:00
Michael DeHaan
e9a24cdad4
Extensive refactoring of bin/ansible, moving most output functions into lib/ansible/utils to
...
encourage readability and make things more maintainable.
2012-03-02 21:08:48 -05:00
Michael DeHaan
b33ef0de60
Add a newline in output here, possibly considering printing top level keys flat
2012-03-02 19:52:43 -05:00
Michael DeHaan
1420c49277
Still seeing some weirdness from ohai but we can probably simplify
...
this until we figure out what that is.
2012-03-02 19:48:37 -05:00
Michael DeHaan
e6a1acf756
Let "all" be an alias for "*" in patterns, fix output bug on non-command execution, make clean now removes the build dir
2012-03-02 19:44:50 -05:00
Michael DeHaan
c8b1bbc7ea
make command module error when no -a more obvious as command is the default module and someone
...
may forget about -a. The CLI already warns about no host pattern by pulling up usage.
2012-03-01 22:25:01 -05:00
Michael DeHaan
146cb3ff7e
update README.md on playbook field names
2012-03-01 22:24:12 -05:00
Michael DeHaan
5040c01640
rename 'pattern' to 'hosts' in playbook format.
2012-03-01 22:20:45 -05:00
Michael DeHaan
687a315a80
Increasing default --forks to 5
2012-03-01 22:19:41 -05:00
Michael DeHaan
847846af0e
-p has been replaced by a required option. Various docs changes.
2012-03-01 22:10:47 -05:00
Michael DeHaan
4ce1f1dd5e
README/doc/example updates to go with group support and CLI option changes.
...
Minimizing manpage until CLI options stabilize.
2012-03-01 21:18:32 -05:00
Michael DeHaan
bed29b7e11
Allow the /etc/ansible/hosts file to contain groups and those group names to be used in place
...
of pattern names.
2012-03-01 20:41:17 -05:00
Michael DeHaan
24d854e0bc
Merge pull request #63 from chjohnst/master
...
add -T option for ssh timeout
2012-03-01 17:06:40 -08:00
Christopher Johnston
d15172abdc
add a -T option for setting ssh timeout in seconds
2012-03-01 16:54:17 -08:00
Michael DeHaan
a191af6af4
Update README.md
2012-02-29 13:58:46 -05:00
Michael DeHaan
f2a0346080
Merge pull request #55 from chjohnst/master
...
python 2.5 dep
2012-02-29 09:36:39 -08:00
Christopher Johnston
2773234c3f
python 2.5 does not include json so lets try to use simplejson
2012-02-29 09:30:02 -08:00
Michael DeHaan
ab266472be
Trim errors on connection refused messages
2012-02-28 04:23:34 -05:00
Michael DeHaan
a40ac93716
Plan to merge things back into ansible means we can simplify our code tree
...
by eliminating the lib/ansible/scripts file. Ansible-playbook
doesn't have enough options to need it's own thing, and we're going to try
to work most things back into bin/ansible
2012-02-28 04:20:25 -05:00
Michael DeHaan
55d256d82a
Added solution to avoid checking in manpages. Just run "make" and we'll build
...
docs before python setup.py. Seems reasonable to let Makefile drive
2012-02-28 04:15:52 -05:00
Michael DeHaan
19fdb7305d
have command module raise an error if no arguments are supplied
2012-02-28 04:02:29 -05:00