James Cammarata
bc1bcc3419
Merge branch 'patch-1' of https://github.com/ktaragorn/ansible into ktaragorn-patch-1
2016-01-18 13:12:01 -05:00
James Cammarata
1825b4a9c7
Fix any_errors_fatal incorrect implementation in 2.0
...
Also adds that flag to blocks.
Fixes #13744
2016-01-15 13:15:10 -05:00
James Cammarata
abc82fee13
Fix typo in 0b86aa6
2016-01-14 11:57:12 -05:00
James Cammarata
0b86aa62e1
Hack to work around callback API change for v2_playbook_on_start
2016-01-14 11:54:44 -05:00
Toshio Kuratomi
8068f23bad
do_encrypt import needed to move as well
...
Fixes #13861
2016-01-13 13:08:33 -08:00
Brian Coca
a196c7d737
only send event if tqm exists
...
fixes #13843
2016-01-13 10:18:36 -05:00
James Cammarata
6ec4d98764
When setting fail state skip RESCUE/ALWAYS if cur_block doesn't have them
...
Fixes #13749
2016-01-11 12:51:04 -05:00
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
2016-01-11 16:30:52 +08:00
Brian Coca
1cc5ac06e7
restructure vars_prompt and fix regression
...
pushed it to use the existing propmpt from display and moved the vars prompt code there also for uniformity
changed vars_prompt to check extra vars vs the empty play.vars to restore 1.9 behaviour
sipmlified the code as it didn't need to check for syntax again (tqm is made none prior based on that)
fixes #13770
2016-01-08 11:46:04 -05:00
Brian Coca
737090dd13
now show full callback stacktrace when vvv+
...
Still is a warning as we don't want to repeat it multiple times nor additional callbacks to stop ansible execution.
hopefully we can avoid shipping w/o exceptions in the default/minimal callbacks...
Also added feature that now allows for 'preformated' strings passed to warning
2016-01-08 10:42:12 -05:00
Brian Coca
095790ac5c
Merge pull request #13691 from bcoca/colors
...
output color is now configurable
2016-01-05 14:33:01 -05:00
James Cammarata
210cf06d9a
Tweak how strategies evaluate failed hosts via the iterator and bug fixes
...
* Added additional methods to the iterator code to assess host failures
while also taking into account the block rescue/always states
* Fixed bugs in the free strategy, where results were not always being
processed after being collected
* Added some prettier printing to the state output from iterator
Fixes #13699
2016-01-02 01:00:12 -05:00
Brian Coca
d3deb24ead
output color is now configurable
2015-12-29 17:40:47 -05:00
James Cammarata
6ae04c1e4f
Fix logic in PlayIterator when inserting tasks during rescue/always
...
Because the fail_state is potentially non-zero in these block sections,
the prior logic led to included tasks not being inserted at all.
Related issue: #13605
2015-12-20 12:39:08 -05:00
James Cammarata
3ec0104128
Fixing bugs in conditional testing with until and some integration runner tweaks
2015-12-19 21:14:48 -05:00
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
2015-12-18 10:58:55 -05:00
James Cammarata
e546219426
Revert "Enable host_key checking at the strategy level"
...
This reverts commit 1a6d660d7e285cceec474952a33af4d8dffd0a8d.
2015-12-17 12:43:47 -05:00
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.
2015-12-16 21:41:07 -05:00
James Cammarata
6312e38133
Fixing up some non-py3 things for unit tests
2015-12-14 10:35:58 -05:00
James Cammarata
120b9a7ac6
Changing the way workers are forked
2015-12-11 23:35:07 -05:00
Charles Paul
6680cc7052
allow custom callbacks with adhoc cli for scripting
...
missing import of CallbackBase
2015-12-10 09:49:54 -05:00
Brian Coca
04d74fd680
reenabled --tree for ansible adhoc command
...
previous fix to avoid callbacks now conflicted with tree optoin
which is implemented as a callback in 2.0
2015-12-09 10:13:50 -08:00
Brian Coca
7936a4687e
adhoc avoids callbacks by default as it did before
...
Previous emptying of whitelist only affected callbacks that were
constructed for need whitelist. This now works for all callbacks.
2015-12-09 10:01:21 -08:00
Toshio Kuratomi
0434644d12
Transform exceptions into ansible messages via to_unicode instead of str to avoid tracebacks.
...
Fixes #13385
2015-12-04 11:50:39 -08:00
James Cammarata
a183972477
Don't use play vars in HostVars
...
Fixes #13398
2015-12-02 14:16:47 -05:00
Matt Martz
384b2e0234
Get v2_playbook_on_start working
...
* Move self._tqm.load_callbacks() earlier to ensure that v2_on_playbook_start can fire
* Pass the playbook instance to v2_on_playbook_start
* Add a _file_name instance attribute to the playbook
2015-12-02 11:29:51 -06:00
James Cammarata
f7dc5a9515
Minor tweak and comment addition to 974a0ce3
2015-12-02 09:11:08 -05:00
Christoph Dittmann
9a6ae1d62a
Let PlayIterator.add_tasks accept empty task lists
...
PlayIterator.add_tasks raised an error when trying to add an empty task
list. This was the root cause of ansible issue #13370 .
2015-12-02 11:17:24 +01:00
James Cammarata
80db6bacc4
Make sure run_once tasks properly set variables for all active hosts
...
Fixes #13267
2015-11-30 11:27:05 -05:00
James Cammarata
dfa576b037
Merge pull request #13307 from Yannig/devel_fix_big_include_vars
...
Fix for https://github.com/ansible/ansible/issues/13221
2015-11-29 23:14:03 -05:00
James Cammarata
6671d78f95
Tweak location of stats callback execution and properly relocate stats output code
2015-11-28 14:03:21 -05:00
James Cammarata
800811a15f
Trigger on_stats just once, not once for each play
...
Fixes #13271
2015-11-28 13:37:43 -05:00
Yannig Perré
5227c6bb52
Do not copy variable_manager each time. Instead, keep host and local variable_manager sync.
...
Fix https://github.com/ansible/ansible/issues/13221
2015-11-28 14:58:33 +01:00
Brian Coca
fa358d9d61
avoids prompting for vars during syntax check
...
fixes #13319
2015-11-27 11:41:00 -08:00
James Cammarata
65747285a4
Properly check for prompting state when re-using ssh connection
...
Fixes #13278
2015-11-24 09:09:54 -05:00
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.
2015-11-23 11:53:05 -05:00
Brian Coca
478c6c756a
marked spot that should send per item reulsts
2015-11-22 14:44:51 -08:00
James Cammarata
78e4f176e6
Return skipped/failed async results directly
...
Fixes #13205
2015-11-19 08:30:00 -05:00
Marius Gedminas
66347c9449
Fix NameError when using loops
...
vars_copy disappeared in 3d1255d190
.
Fixes #13213 .
2015-11-19 09:21:06 +02:00
James Cammarata
3d1255d190
Don't update job vars too early when getting loop items in TaskExecutor
...
Fixes #13113
2015-11-18 19:12:38 -05:00
James Cammarata
25807f5404
Don't modify things we've put on the queue
...
Fixes #12937
2015-11-17 14:22:52 -05:00
James Cammarata
9f31c073fe
Fixing a few bugs in the HostVars performance areas
...
* Also refresh inventory in the HostVars manager process when things
are changed via add_host/group_by
* Raise j2undefined rather than return it
2015-11-17 09:15:10 -05:00
James Cammarata
5cbeab5a3c
Performance improvements for HostVars and some bugfixes
2015-11-16 17:15:52 -05:00
Dann Bohn
7f2cae5405
add REPLACER_SELINUX back into module_common
2015-11-16 16:35:55 -05:00
James Cammarata
2b25b7974c
Remove unnecessary sleep from result process
2015-11-13 16:45:45 -05:00
James Cammarata
13750f68ee
Reduce spinning while waiting on queues
2015-11-12 14:41:09 -05:00
James Cammarata
b2b0fa8d13
Changed do/until failed color
...
Fixes #13130
2015-11-11 14:43:15 -05:00
James Cammarata
94c20c9ac6
Cleanup failed/changed logic in TaskExecutor
...
Fixes #12980
2015-11-11 14:23:37 -05:00
Toshio Kuratomi
62979efa14
Finish up plugin porting to global display
...
Also remove display = display which does nothing
2015-11-11 10:44:23 -08:00
Toshio Kuratomi
186e034515
Move the rest of executor code to global display
2015-11-11 10:44:22 -08:00