Stephen Fromm
fdee1d3459
Add support to bin/ansible for --connection option
2012-04-10 16:28:43 -07:00
Seth Vidal
8ae71cc7b1
go back to using a normal optparser to add options instead of the dict
...
interface.
add very small subclass of OptionParser to sort the options so mdehaan is happy
2012-04-10 13:51:58 -04:00
Brad Olson
f840c0d167
Wired in Michael's usage string optparse style.
2012-04-09 23:12:05 +00:00
Michael DeHaan
7b9856bc0e
Modification on top of skvidal's common options patch to keep options to command line tools sorted.
2012-04-06 10:59:15 -04:00
Seth Vidal
7e50d170a8
move the bulk of the opt parsing out of ansible/ansible-playbook and into utils
...
for other scripts to use.
2012-04-05 17:06:23 -04:00
Michael DeHaan
2511992659
Surface module debug (-D) to /usr/bin/ansible also
2012-03-31 11:45:29 -04:00
Michael DeHaan
6275e57718
pyflakes: Unused import / unused var
2012-03-30 23:04:02 -04:00
Michael DeHaan
3ded27fe35
Treat module args as strings everywhere to avoid unneccessary shlex and requoting
2012-03-30 22:47:58 -04:00
Michael DeHaan
81e3496037
Added preliminary support for --sudo to ansible, playbook support and further testing pending.
2012-03-29 01:37:06 -04:00
Tim Bielawa
5261d14aef
Fix exception catching for py2.4
2012-03-29 14:19:09 -04:00
Michael DeHaan
b30ddc4520
Expose remote_port option in playbook
2012-03-28 19:31:17 -04:00
Christopher Johnston
9041ad4d83
just some minor clean up single vs double in getopt parsing
2012-03-28 14:17:20 -07:00
Christopher Johnston
f06ec76fdb
add support for using an alternate remote port
2012-03-28 14:05:31 -07:00
Michael DeHaan
01e51b120a
Recieved quite a few requests to run python via /usr/bin/env, so doing that.
2012-03-26 22:07:04 -04:00
Michael DeHaan
45a455a805
Make /usr/bin/ansible output realtime and also delete some code!
2012-03-26 21:17:11 -04:00
Michael DeHaan
6dda6f12dc
Applying callback model to runner, and using that in playbooks, so output can be more immediate in playbooks.
...
(Runner still does not use callbacks for default output)
2012-03-25 19:05:27 -04:00
Michael DeHaan
9c5ec886a6
Import cleanup, plus have /bin/ansible remind you if no hosts were matched by a pattern (for instance, assume
...
there was a typo in the pattern)
2012-03-18 17:53:58 -04:00
Michael DeHaan
fde7de80df
Remove "import *" from bin/ansible so we can use pyflakes, and remove unneeded imports in the process
2012-03-18 17:41:44 -04:00
Michael DeHaan
9f6d98844e
If the inventory file is EXECUTABLE, treat it as a file returning JSON, if called directly, return the host
...
and groups list. If called with an argument of a host name, return the key=value data for that particular
host.
2012-03-30 19:06:14 -04:00
Michael DeHaan
db61e8f346
Fix -t tree mode so it writes out the value for each host, not everything, once again
2012-03-13 21:38:06 -04:00
Michael DeHaan
4ae98ed92d
Upgrades to error handling, now general try/catch available.
2012-03-13 20:59:05 -04:00
Tim Bielawa
dfd2c6dce3
Implement friendlier error handling.
...
Generic AnsibleError exception + host inventory missing exception.
First shot at catching these in a generic way in bin/ansible*.
2012-03-12 23:11:54 -04:00
Michael DeHaan
db7ba87111
Add polling logic in runner such that all actions get kicked off everywhere then polling
...
happens only on needed hosts, allowing some hosts to fail and drop out of the running.
2012-03-11 20:54:54 -04:00
Michael DeHaan
5be1a612d3
Add async polling logic to runner. Will add to playbook shortly, have to diagnose why paramiko
...
is not letting async_wrapper daemonize itself when it does work fine when directly executed.
2012-03-11 18:40:35 -04: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
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
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
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
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
Christopher Johnston
d15172abdc
add a -T option for setting ssh timeout in seconds
2012-03-01 16:54:17 -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
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
1427ade3af
Have ansible yell if no module name is supplied
2012-02-28 04:00:31 -05:00
Michael DeHaan
edf6da5c38
Rename opts so --help looks cleaner
2012-02-28 03:57:43 -05:00
Michael DeHaan
281f96b8dd
merge Seth's ansible-command script with ansible proper, so we can do nice output, one line output,
...
and treeish saving everywhere.
there are probably some quirks here we'll want to refine further later, for instance, we should
be able to do nicer things with "can't contact host tracebacks".
2012-02-28 03:54:41 -05:00
Michael DeHaan
01e5da6d0b
Make /bin/ansible use the common options from lib/ansible/scripts
...
DRY!
2012-02-28 01:33:22 -05:00
Michael DeHaan
be4cb64c92
Relicensing to GPLv3, all previous committers ok'd on mailing list.
2012-02-28 19:08:09 -05:00
Michael DeHaan
a5039eec62
Update reporting on playbook runs.
2012-02-25 15:21:11 -05:00
Seth Vidal
ee95a5b0a4
use shlex.split() instead of split() to keep quoting sane for commands
2012-02-24 23:35:09 -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
767517ac65
Force forks to be an integer when read by command line
2012-02-23 23:57:26 -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
Seth Vidal
08b45d6da1
add support to prompt for ssh password on the cli
2012-02-24 18:13:11 -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