Toshio Kuratomi
2fd7f194c8
Convert byte strings to unicode strings in our task results ( #15581 )
...
Fixes #15367
10 years ago
James Cammarata
6eefc11c39
Make the loop variable (item by default) settable per task
...
Required for include+with* tasks which may include files that also
have tasks containing a with* loop.
Fixes #12736
10 years ago
James Cammarata
d358a22542
Modification to 347b282 to prevent running the lookup with empty terms
...
Fixes #15258
10 years ago
Brian Coca
5b11494437
python3 compatiblity
...
remove use of basestring
deal with configparser
10 years ago
Abhijit Menon-Sen
1b242ffb89
Merge pull request #15111 from xiaket/devel
...
complete the docstring. Fixed #14794
10 years ago
夏恺(Xia Kai)
f9a9e5e1b9
complete the docstring. Fixed #14794
...
Signed-off-by: 夏恺(Xia Kai) <xiaket@gmail.com>
10 years ago
James Cammarata
09e5f0578a
Don't always insert failed in the results (again)
10 years ago
James Cammarata
ccf646665b
Revert "Removing explicit setting of failed/failed_when"
...
This reverts commit 4e528e9535 .
10 years ago
James Cammarata
4e528e9535
Removing explicit setting of failed/failed_when
10 years ago
nitzmahone
dbff3a6bbc
Fix blind override in failed_when
...
caused all task failures to be success
10 years ago
Brian Coca
9318727021
corrected changed_when handling
10 years ago
Brian Coca
7067bb32b8
make all conditionals lists
...
this brings them to equivalence with when:
fixes #13905
10 years ago
Brian Coca
71402abf21
only do squash when 'squashable field' present
10 years ago
Brian Coca
67d5b77898
added package to special 'squashable' fields
...
apt has it as alias, this should fix https://github.com/ansible/ansible-modules-core/issues/3145
10 years ago
Brian Coca
512d3dd621
with_ loops always should want a list
10 years ago
Brian Coca
34541b4e5e
preserve no_log for async also
10 years ago
James Cammarata
e02b98274b
issue callbacks per item and retry fails
...
- now workers passes queue to task_executor so it can send back events per item and on retry attempt
- updated result class to pass along events to strategy
- base strategy updated to forward new events to callback
- callbacks now remove 'items' on final result but process them directly when invoked per item
- new callback method to deal with retry attempt messages (also now obeys nolog)
- updated tests to match new signature of task_executor
fixes #14558
fixes #14072
10 years ago
James Cammarata
6cf6130468
Fixing/cleaning up do/until logic in TaskExecutor
...
* Fixes bug where the task was not marked as failed if the number of
retries were exceeded (#14461 )
* Reorganizing logic to be a bit cleaner, and so retrie messages are
shown before sleeping (which makes way more sense)
Fixes #14461
Fixes #14580
10 years ago
Brian Coca
d54d9dabe9
added specific info to deprecation message
...
should now show actual variable that is undefined
fixes #14526
10 years ago
Brian Coca
347b28252a
allow skipping tasks due to undefined var
...
mimic 1.x behaviour but give out big deprecation message, not only
for missing attribute but any undefined error.
10 years ago
James Cammarata
2adddac94c
Catch exceptions during module execution so they don't fail the worker
...
Fixes #14120
10 years ago
Toshio Kuratomi
0e410bbc8a
Squashing was occuring even though pkgs didn't have a template that would be affected by squash
...
This broke other uses of looping (looping for delegate_to in the
reported bug)
Fixes #13980
10 years ago
James Cammarata
1733d434d1
Fix with loop + delegate issues
...
* Don't re-use the existing connection if the remote_addr field of
the play context has changed
* When overriding variables in PlayContext (from task/variables),
don't set the same attribute based on a different variable name
if we had already previously set it from another variable name
Fixes #13880
10 years ago
James Cammarata
c42484a029
Minor cleanup when reassigning play context to reused connections
...
* Relocate the assignment of the host address to the remote_addr field
in the play context, which was only done when the connection was created
(it's now done after the post_validate() is called on the play context)
* Make the assignment of the play context to the connection an else, since
it's not required if the connection is not reused
10 years ago
Karthik T
c4cbeeffa8
Fixes #13763 Update connections _play_context on every iteration
...
If this isnt updated, the _connection is reused, and thus has an outdated _play_context
This results in outdated `success_key` and `prompt` causing issues if sudo is run in a loop
Refer to the issue #13763 for more debugging and details
10 years ago
Brian Coca
d3deb24ead
output color is now configurable
10 years ago
James Cammarata
3ec0104128
Fixing bugs in conditional testing with until and some integration runner tweaks
10 years ago
James Cammarata
a3dcb910b8
Fixing bugs with {changed,failed}_when and until with registered vars
...
* Saving of the registered variable was occuring after the tests for
changed/failed_when.
* Each of the above fields and until were being post_validated too early,
so variables which were not defined at that time were causing task
failures.
Fixes #13591
10 years ago
James Cammarata
e546219426
Revert "Enable host_key checking at the strategy level"
...
This reverts commit 1a6d660d7e285cceec474952a33af4d8dffd0a8d.
10 years ago
James Cammarata
e5c2c03dea
Enable host_key checking at the strategy level
...
Implements a new method in the ssh connection plugin (fetch_and_store_key)
which is used to prefetch the key using ssh-keyscan.
10 years ago
Toshio Kuratomi
0434644d12
Transform exceptions into ansible messages via to_unicode instead of str to avoid tracebacks.
...
Fixes #13385
10 years ago
James Cammarata
65747285a4
Properly check for prompting state when re-using ssh connection
...
Fixes #13278
10 years ago
Chris Church
272778f732
Modify task executor to reuse connection inside a loop. Fix WinRM connection to set _connected properly and display when remote shell is opened/closed. Add integration test using raw + with_items.
10 years ago
Brian Coca
478c6c756a
marked spot that should send per item reulsts
10 years ago
James Cammarata
78e4f176e6
Return skipped/failed async results directly
...
Fixes #13205
10 years ago
Marius Gedminas
66347c9449
Fix NameError when using loops
...
vars_copy disappeared in 3d1255d190 .
Fixes #13213 .
10 years ago
James Cammarata
3d1255d190
Don't update job vars too early when getting loop items in TaskExecutor
...
Fixes #13113
10 years ago
James Cammarata
b2b0fa8d13
Changed do/until failed color
...
Fixes #13130
10 years ago
James Cammarata
94c20c9ac6
Cleanup failed/changed logic in TaskExecutor
...
Fixes #12980
10 years ago
Toshio Kuratomi
62979efa14
Finish up plugin porting to global display
...
Also remove display = display which does nothing
10 years ago
Toshio Kuratomi
186e034515
Move the rest of executor code to global display
10 years ago
Toshio Kuratomi
e45ce871a7
Fix for traceback when neither name nor pkg are in the module params
10 years ago
James Cammarata
a99f2fd52f
Save delegated vars in result for use in callback methods
...
Fixes #13014
10 years ago
Yannig Perré
0c360d17cb
New parameter for template method.
...
We do not compute hash when we know that the result does not need to be cached (like with_items loop).
It also result in a small speed improvement.
10 years ago
Toshio Kuratomi
1a04f354f3
For with_first_found loops, set undefined variables to fall through rather than failing the task
10 years ago
James Cammarata
63c47fb271
Fixing up performance
10 years ago
Toshio Kuratomi
4f6d4c6bf6
Set task_action when the action does not need to be templated
...
Fixes #13042
10 years ago
Toshio Kuratomi
483491ddfb
template the task_action before checking whether to optimize with_item loops for it.
...
Fixes the second problem discovered in #12976
10 years ago
Toshio Kuratomi
9e758d3d97
Do not optimize with_items loop if the items are not strings
...
The code isn't sophisticated enough to understand lists and dicts yet.
This mirrors how 1.9.x handled non-string items so its not a regression.
One portion of a fix for #12976
10 years ago
James Cammarata
a5bd92ca4b
Merge branch 'devel_fix_debug_var' of https://github.com/Yannig/ansible into Yannig-devel_fix_debug_var
10 years ago