Commit Graph

25 Commits (94605b811b984619c00c32f2b3de3977dd2be001)

Author SHA1 Message Date
Michael DeHaan 6a7aac38c5 misc cleanup in the runner module, splitting some things out into utils, breaking up functions into smaller functions. 2012-03-21 23:39:09 -04:00
Michael DeHaan a5f4ca50b8 Ratchet up logging a few notches prior to controlling w/ verbosity settings 2012-03-20 22:29:21 -04:00
Michael DeHaan b5c62ec068 Enhance logging, way to gate verbosity levels pending. 2012-03-20 21:44:01 -04:00
Michael DeHaan 4de7bbb169 Allow conditional imports, see examples/playbook3.yml comments for a full explanation. Extensive
refactoring of playbooks now warranted, which we'll do before we move on.   This variable assignment
system makes nearly all possible magic possible, for we can use these variables however we like,
even as module names!
2012-03-19 22:42:31 -04:00
Michael DeHaan 5ed2b894d9 Add an additional way to dereference a variable in a playbook, $foo
(Using varReplace function originally from yum, thanks Seth)
2012-03-19 19:32:38 -04:00
Michael DeHaan af9596307d Move templating into a utils function. Reuse is our friend. 2012-03-19 19:23:14 -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 c861e0de55 Fix "import *" and resultant new things detectable from "make pyflakes" 2012-03-18 17:16:12 -04:00
Michael DeHaan 63818000b4 auto call the file module after copy/template module usage in runner
note some changed=True/False detection bits in file module still need tweaking
2012-03-15 22:32:14 -04:00
Michael DeHaan be55145a1e Initial crack at the file module 2012-03-15 21:53:14 -04:00
Michael DeHaan 1a0672fd1e Fix exception type 2012-03-14 12:51:26 -04:00
Michael DeHaan 4bde4926c3 Modules don't have to return JSON, key=value pairs is ok. 2012-03-14 21:16:15 -04:00
Michael DeHaan 40fd778e2c 'shell' is a magic module that executes the command module with shell=True 2012-03-14 20:40:06 -04:00
Michael DeHaan 4ae98ed92d Upgrades to error handling, now general try/catch available. 2012-03-13 20:59:05 -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 49a636d8a0 Fixed up async and polling logic. 2012-03-11 19:27:43 -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 4c9dd972b4 Fixes for output formatting 2012-03-10 13:40:08 -05:00
Michael DeHaan bb5e4fad48 Abstracted out transport from implementation so it can be pluggable. Also fixes for output format. 2012-03-10 13:35:46 -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 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 34cbbfbfe1 Added pydoc for utils.py 2012-03-02 21:16:29 -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