Commit Graph

113 Commits (ec7c8eb8ca85c584ca80e215bbb2397c24a14687)

Author SHA1 Message Date
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
Michael DeHaan 183330a9fa Merge pull request #662 from tima/regex-cond-tasks
Importing re in runner for doing conditional tasks using pattern matching i.e. re.search(). Also conditionally outputting item when skipping.
2012-07-23 17:52:52 -07:00
Michael DeHaan cbea17e4c5 Fix up async 2012-07-23 20:46:35 -04:00
Michael DeHaan cac7afd700 async is under construction 2012-07-23 20:06:18 -04:00
Michael DeHaan 1f44c07ddf Fix assemble usage, some issues still with async. 2012-07-23 19:40:21 -04:00
Timothy Appnel 4b9b9a8a5b Importing re in runner for doing conditional tasks using pattern matching i.e. re.search(). Also conditionally outputting item when skipping. 2012-07-23 19:36:26 -04:00
Michael DeHaan ec12cc4154 Save the transfer of the module file for new style modules, because we can inject the arguments into the modules.
Module consumers using the API don't have to know how this works.  base64 stuff is only there
because escaping a docstring inside a docstring was a bit of a challenge :)
2012-07-23 19:18:45 -04:00
Michael DeHaan 0b891fc8fb Tweaking daisychain internals to allow get_url to modify the path destination when downloading to a directory.
Minor module refactoring.
2012-07-22 11:08:16 -04:00
Michael DeHaan d76c8c9c85 Various cleanup around runner's constructor and how daisy chaining is invoked. 2012-07-21 16:51:31 -04:00
Michael DeHaan 1682dd06c0 Avoid duplicate call to fetch inventory variables 2012-07-21 16:23:00 -04:00
Michael DeHaan 54c9c1e25c Some streamlining of first_available_file code 2012-07-21 16:15:36 -04:00
Michael DeHaan 2d06ee4c0d Fix some subtle things that were keeping 'hostvars' from being usable in templates. 2012-07-20 12:34:26 -04:00
Michael DeHaan 2b6d8a8be5 Fix some issues with the setup cache 2012-07-20 11:58:08 -04:00
Michael DeHaan 5a67a556cd Script to migrate YAML users to the INI format, so we can deprecate YAML inventory (which we are now doing). 2012-07-20 11:15:57 -04:00
Michael DeHaan dcca08b27b Don't let with_items erase 'hostvars' 2012-07-20 10:02:35 -04:00
Michael DeHaan db1a4d8fac Make 'assemble' use the new daisychain logic 2012-07-20 09:17:42 -04:00
Michael DeHaan 6fb74ae2f9 preserve 'changed' attributes in daisychain logic 2012-07-20 09:13:10 -04:00
Michael DeHaan d72c0c8898 replace module daisy-chaining logic 2012-07-20 08:57:50 -04:00
Michael DeHaan 6e84374c2a Make hostvars work post refactoring 2012-07-20 08:29:44 -04:00
Michael DeHaan b0eedfbf92 Merge pull request #639 from goozbach/issue-627
improved output in with_items fixes: #627
2012-07-20 16:36:49 -07:00
Derek Carter 34e2584220 improved output in with_items fixes: #627 2012-07-20 14:01:54 -04:00
Rodney Quillo 5f068913ee Suppress Ubuntu ssh -tt error ioctl error. 2012-07-20 13:23:14 +08:00
Michael DeHaan 9006d4557d Added code to allow insertion of boilerplate into modules to make them able to share lots of code, the result
should be a huge reduction of total ansible source, at a slight cost of difficulty in original module development.

We need to apply this now to all modules, but may need to have some exemptions to things like command, which should
subclass this module.
2012-07-17 22:34:52 -04:00
Michael DeHaan 8bb8314d10 Inject vars need to pushed further up to make with_items work as desired. 2012-07-17 20:09:18 -04:00
Ludovic Claude 26dc607c5c Revert "Change previous fix to a one line change relative to upstream"
This reverts commit 0d53b1b097.
2012-07-18 19:02:56 +02:00
Ludovic Claude 0d53b1b097 Change previous fix to a one line change relative to upstream 2012-07-18 17:52:51 +02:00
Ludovic Claude c4303c8c04 Avoid spurious error when mixing a local play with remote plays depending on --ask-sudo-pass 2012-07-18 12:05:12 +02:00
Dave Hatton 72ca9e58e7 meaningful messages if the remote md5 fails 2012-07-17 09:14:16 +01:00
Michael DeHaan 0edd0d4736 Fixing template calls 2012-07-16 20:26:39 -04:00
Michael DeHaan 5f69c557b9 Fix for the way host variables were being swallowed, plus some overall simplification. Deciding what
dictionary to use for templating now happens in exactly one place (executor_internal) and the "inject"
dictionary is passed to what needs it.
2012-07-15 14:19:11 -04:00
Dave Hatton c3205595b3 format fixes to make fetch more usable 2012-07-16 11:43:37 +01:00
Michael DeHaan b542dd8466 Fix import in ssh connection 2012-07-15 13:12:11 -04:00
Michael DeHaan 80edea2934 with_items handling code should apply to all modules, was screwed up in refactoring to only apply to 'normal'
modules.
2012-07-15 12:51:56 -04:00
Michael DeHaan 1754de3335 Misc code cleanup, mostly whitespace preferences, removing unused imports, plus a few fixes here and there. 2012-07-15 12:29:53 -04:00
Michael DeHaan 4b73931351 misc code cleanup, don't pass parameters to the connection object we can already get from Runner 2012-07-15 11:54:39 -04:00