Commit Graph

147 Commits (7ab0d60b1aa8a9470594d897d642036baf9fc9c2)

Author SHA1 Message Date
Michael DeHaan deec50fc3c Default -u (user) and "user:" in playbooks to the current user. 2012-08-11 17:33:34 -04:00
Michael DeHaan 3587ffdef3 Allow /bin/ansible to use --limit 2012-08-11 14:05:24 -04:00
Dietmar Schinnerl ac44c36e4f Removed unnecessary string replacements since parse_json already filters garbage lines 2012-08-11 16:57:04 +02:00
Dietmar Schinnerl fbdddc7c74 Added utils.last_non_blank_line 2012-08-11 16:14:19 +02:00
Dietmar Schinnerl 993bb5c6f1 Added stub implementation of filters 2012-08-11 15:55:14 +02:00
Dietmar Schinnerl 6a18075640 Issue #848: Closing stdin after we read from stdout 2012-08-11 15:13:07 +02: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 07f459f3b2 Allow user to be passed in via --extra-vars 2012-08-09 21:14:30 -04:00
Sundar Raman 2f754f0284 (Re #829) Fix for sudo_cmd not defined 2012-08-09 18:02:21 -04:00
Tim Bielawa bf7e83bea6 Update man pages and the message for an exception. 2012-08-09 10:22:43 -04: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 183fce6d99 Detect SFTP disablement in paramiko + changelog updates 2012-08-08 20:27:33 -04: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
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 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 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
Michael DeHaan fe87a16a3e Make yum module use one-pass with with_items 2012-08-01 22:27:25 -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
Petros Moisiadis 2ac4acbf97 fixes for tests 2012-08-01 22:17:16 +03:00
Petros Moisiadis 5f4bf813b1 added an 'ignore_errors' option to tasks
Failed tasks with ignore_errors=True, allow the remaining tasks in the
play to be executed as if no failure happened. A failure notice is still
written to the output as well as an '...ignoring' message.
2012-08-01 19:13:07 +03:00
Timothy Appnel b30f4688cd concatenating stdout and stderr in runner/__init__'s _low_level_exec_command. 2012-07-31 16:59:45 -04:00
u348095 7e279f972e Use sudo_user as an argument in the sudo command 2012-07-31 16:21:24 +10:00
Michael DeHaan 17be5537d6 When sudoing to another user, the umask may be set such that the next user might not be able to read/execute
the file.  Deal with this.
2012-07-28 08:48:05 -04:00
Michael DeHaan fcdc281c28 If sudoing to a user other than root, the home directory of the original user is very unlikely to be readable by the
sudoed to user, so just use tmp.  Data will be readable by others (briefly before deletion) but never writeable.
2012-07-27 20:53:50 -04:00
Michael DeHaan aa40c5f3b3 remove commented out debug lines 2012-07-27 20:44:55 -04:00
Michael DeHaan a65b4fef97 Fix up chain invocations of template 2012-07-26 00:39:44 -04:00
Michael DeHaan 19fc8eea80 Things that happen inside multiprocessing shouldn't make side effects, ergo append ansible_facts only
in playbook code.

This technically means with_items calls can't continuously add facts I guess, but I can't see anyone
ever trying that.
2012-07-25 21:30:49 -04:00
Lorin Hochstein b63a3bd0c7 Save module name and args when processing list of items.
This is necessary because daisy-chained modules will overwrite
these values.
2012-07-25 13:26:07 -04:00
Michael DeHaan c16b691883 Copy module needs to use src as transfer path. 2012-07-24 20:35:10 -04:00
Jan-Piet Mens 44a9226ece file mode now correctly set after chaining from copy 2012-07-24 16:43:36 +02:00
Michael DeHaan 3a2df329af Tweak the way chained callbacks work 2012-07-23 22:12:26 -04:00
Michael DeHaan dd6399b5ae Fixup args being passed into file from copy, tweak preservation of changed attribute. 2012-07-23 21:56:21 -04:00
Michael DeHaan 153f3932b5 reinstate delete_remote_files 2012-07-23 21:30:09 -04:00
Michael DeHaan 632a83c79e Remove unused function 2012-07-23 21:28:18 -04:00
Michael DeHaan 479f8b8c26 Templating neccessary here. 2012-07-23 21:10:16 -04:00
Michael DeHaan 9b8793e42e Fix a glitch with daisy chain logic 2012-07-23 21:01:59 -04:00