Commit graph

656 commits

Author SHA1 Message Date
Michael DeHaan
05a128c2be Add ability to store and access module results later on in the play. See examples/playbooks/register_logic for details. 2012-08-10 01:13:37 -04:00
Michael DeHaan
6c5761a79e Store the ${last_result} for each host to make it usable in only_if conditionals and such. 2012-08-10 00:58:53 -04:00
Michael DeHaan
c7888dd642 Given user report that EL5 sudo does not support '--', remove it, and things seem to still work fine.
let me know if this breaks any other boxes.
2012-08-10 00:15:23 -04:00
Michael DeHaan
02ba5a48e0 Merge branch 'cleanup-imports' of https://github.com/jdavisp3/ansible into devel 2012-08-10 00:05:04 -04:00
Michael DeHaan
a7415e5409 Merge pull request #836 from sfromm/rawfixes
Fixes for raw module usage and failure to open_session()
2012-08-10 17:01:47 -07:00
Sebastien Bocahu
a3ff6b1958 Fix unneeded bashism
Signed-off-by: Sebastien Bocahu <sebastien@ispfr.net>
2012-08-10 15:57:51 +02:00
Stephen Fromm
569d377183 Wrap paramiko open_session() call in try/except
Ran across non-unix host where the call to paramiko's open_session() in
exec_command() would throw a EOFError exception.  This change wraps the
block in a try/except.
2012-08-09 21:47:09 -07:00
Stephen Fromm
f9bdfde614 Fixes for runner and raw module
runner should not try to create or remove tmp paths when using the raw
module.
2012-08-09 21:45:00 -07:00
Dave Peticolas
08272dc25d Remove unused imports. 2012-08-09 21:35:22 -07:00
Michael DeHaan
05d6e74cce Merge branch 'vars_prompt_encrypt' of https://github.com/cocoy/ansible into devel 2012-08-09 21:41:12 -04:00
Michael DeHaan
07f459f3b2 Allow user to be passed in via --extra-vars 2012-08-09 21:14:30 -04:00
Michael DeHaan
98a5565106 Fixing up parameterized task includes such that variables can be easily handed to them. 2012-08-09 21:09:12 -04:00
Sundar Raman
2f754f0284 (Re #829) Fix for sudo_cmd not defined 2012-08-09 18:02:21 -04:00
Rodney Quillo
d1f821361d vars_prompt encrypt from mgw 2012-08-09 22:56:40 +08:00
Tim Bielawa
bf7e83bea6 Update man pages and the message for an exception. 2012-08-09 10:22:43 -04:00
Michael DeHaan
093bbd1c82 Slight version format tweaks 2012-08-08 21:23:33 -04:00
Michael DeHaan
e654f881a8 Merge pull request #812 from willthames/gitversion
Added commit time information to the --version output
2012-08-08 18:50:04 -07:00
willthames
208f2b66ed Added commit time information to the --version output
Now prints date of commit (and timezone offset of commit)
Hopefully resolves #783
2012-08-09 11:24:56 +10:00
Michael DeHaan
40ff3eb106 Catch socket errors so if you control-c a playbook it does not traceback 2012-08-08 21:19:20 -04:00
Michael DeHaan
85ba71a7fe Split -vv from -vvv 2012-08-08 21:16:48 -04:00
Michael DeHaan
cac4effd8f Add module arguments remote modules to -vvv output 2012-08-08 21:13:31 -04:00
Michael DeHaan
846186e2fc Add -vvv support for debugging activity 2012-08-08 21:09:14 -04:00
Michael DeHaan
c82f06258c Only run yum,apt through the with_items loop if there is a list of items. Just a cosmetic fix on return values
for the most part.
2012-08-08 20:43:01 -04:00
Michael DeHaan
2f6d6ccb5a Nicer errors from modules if arguments are not fed key=value 2012-08-08 20:30:20 -04:00
Michael DeHaan
183fce6d99 Detect SFTP disablement in paramiko + changelog updates 2012-08-08 20:27:33 -04:00
Michael DeHaan
51083e48e9 remove duplicate code path as few will have git python installed 2012-08-08 20:19:32 -04:00
Michael DeHaan
fde329fb9e Merge branch 'gitversion' of https://github.com/willthames/ansible into devel 2012-08-08 20:17:18 -04:00
Will Thames
9a50ed9b7b Added git information to version string
Running ansible --version now outputs git information when the
repo lives in .git in the root of the ansible source (coping with the case
where the git info is elsewhere is left as an exercise).

This uses gitpython where installed, otherwise it interrogates the files
in the .git directory to get the same information.

The gitpython path could be removed, but then people might ask 'why did
you do it like this when gitpython exists'
2012-08-09 10:12:04 +10:00
Michael DeHaan
176bf3cbb5 Save extra chmod step if sudoing to root 2012-08-08 19:17:31 -04:00
Will Thames
414eceb138 chmod needs more specific arguments to work with sudo_user
Basically if umask is set to something like 0007 then chmod +r and chmod +x
are not the same as chmod a+r and chmod a+x

Using os.path.basename rather than source.split should make ansible more
portable (and even if never ported, more readable)
2012-08-08 16:12:50 +10:00
Tim Bielawa
3937707117 Add 'polite' YAML syntax validation and hinting. Closes #798 2012-08-07 18:24:47 -04:00
Michael DeHaan
faed4b5a33 whitespace + remove deprecated YAML parser (migration script lives in examples/scripts and warning was added
in 0.6 release)
2012-08-06 20:07:02 -04:00
Michael DeHaan
fd265b40b7 Release bump 2012-08-06 19:55:27 -04:00
Michael DeHaan
08c1f96e4b Fix some subtle behavior of how the get_url module chains into the file module, plus blend the results of daisy chain
operations in the correct order, so the file module results overlay the original module results, not the other way
around (which keeps any failure msg's intact)
2012-08-03 07:02:31 -04:00
Michael DeHaan
ce01c3f7e7 Allow unicode transfer by not base64 encoding. Also: faster 2012-08-02 21:20:43 -04:00
Michael DeHaan
227dfc17f3 fix tree output 2012-08-02 20:42:32 -04:00
Michael DeHaan
05df6464ef Make module args as unicode more or less not choke. 2012-08-02 20:29:18 -04:00
Michael DeHaan
b76efa39be Fix some templating issues, needs testing with anti-unicode safeguard around shlex.split 2012-08-02 20:21:59 -04:00
Seth Vidal
f924c96370 remove the tab I found
DIE TAB DIE
pep8
2012-08-02 17:26:04 -04:00
Michael DeHaan
c192d8a2b2 Revert "Apply templating to module arguments in playbook"
Breaks copy module by introducing unicodeness, among other things

This reverts commit 4fedb17e38.
2012-08-01 23:07:15 -04:00
Michael DeHaan
38ed7ca7df Merge pull request #759 from lorin/error-feedback
If task action is invalid, output the name in error message
2012-08-02 05:39:53 -07:00
Lorin Hochstein
aed6ee7f74 Report only name in task error, all on one line 2012-08-02 08:37:43 -04:00
Lorin Hochstein
fa9fe9d246 If task action is invalid, output the name and action. 2012-08-01 23:51:25 -04:00
Michael DeHaan
fe87a16a3e Make yum module use one-pass with with_items 2012-08-01 22:27:25 -04:00
Will Thames
4fedb17e38 Apply templating to module arguments in playbook
Module arguments should have variable substitution applied
Also, replacing task.action with the templated task.name seems wrong
2012-08-01 22:22:46 -04:00
Will Thames
d43d81a9a4 Raise exception when sudo user does not exist
sudo can fail before getting to the password prompt if a user does not exist
<pre>
[will@tangerine ansible (sudo_missing_user)]$ sudo -u bobbins echo hello
sudo: unknown user: bobbins
sudo: unable to initialize policy plugin
</pre>
Fix raises a distinct exception when that occurs
2012-08-02 16:19:15 +10:00
Michael DeHaan
25acfa8170 Join with_items for the apt module, yum pending, and various fixes to the yum module to support aliases 2012-08-01 20:33:13 -04:00
Michael DeHaan
86ec639176 add error handling if you try to load files in the wrong data format 2012-08-01 19:51:52 -04:00
Michael DeHaan
08c5fe875b yell if input data for host or group vars are not hashes 2012-08-01 19:46:33 -04:00
Michael DeHaan
ed14312ad6 reinstate invalid argument checks where possible, daisy chainee/chained modules turn it off 2012-08-01 19:42:31 -04:00