James Cammarata
a8dbd3dee9
Pass the variable manager into load_list_of_blocks for include files
...
Fixes #15194
2016-03-31 00:44:41 -04:00
Brian Coca
5dfc013e18
Merge pull request #14971 from bcoca/clear_facts
...
meta: clear_facts
2016-03-30 19:09:38 -07:00
James Cammarata
13f3cbaf3b
Renaming per-item and retry callbacks
2016-03-18 15:17:43 -04:00
Brian Coca
09699d0cd0
meta: clear_facts
...
draft implementation
2016-03-14 21:24:26 -07:00
Brian Coca
49bb4803b5
clarify --step prompt
...
now shows full words and indicates default
fixes #7433
2016-03-08 10:57:54 -05:00
Brian Coca
66ea464ebd
Merge pull request #14793 from xiaket/devel
...
remove main_q for simplicity.
2016-03-07 12:51:38 -05:00
Brian Coca
25e9b5788b
add per item diff handling
...
fixes #14843
2016-03-07 09:49:18 -05:00
夏恺(Xia Kai)
b33074b703
remove main_q for simplicity.
...
main_q is not used anywhere in the codebase.
It is created in TaskQueueManager._initialize_processes, bundled with rslt_q
into TaskQueueManger._workers, later unwrapped in StrategyBase but not used.
This queue is closed in TaskQueueManger._cleanup_processes.
Historically, it is passed as a init parameter into WorkerProcess,
introduced in 62d7956
, but this behavior is changed in 120b9a7
.
Signed-off-by: 夏恺(Xia Kai) <xiaket@gmail.com>
2016-03-04 07:58:18 +00:00
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
2016-02-23 15:07:06 -05:00
James Cammarata
06b072c1f7
Fix bugs related to task_includes and dep chain inheritance
...
* Fix the way task_include fields were created and copied
* Have blocks get_dep_chain() look at task_include's blocks for proper
dep chain inheritance
* Fix the way task_include fields are copied to prevent a recursive
degradation
Fixes #14460
2016-02-13 01:02:47 -05:00
James Cammarata
275728e0f6
Fixing bugs related to nested blocks inside roles
...
* Make sure dep chains are checked recursively for nested blocks
* Fixing iterator is_failed() check to make sure we're not in a
rescue block before returning True
* Use is_failed() to test whether a host should be added to the TQM
failed_hosts list
* Use is_failed() when compiling the list of hosts left to iterate
over in both the linear and free strategies
Fixes #14222
2016-02-12 13:39:39 -05:00
Felix Fontein
8eea1c7e01
Allowing multiple tags to be specified in include's tags argument.
2016-02-06 21:19:03 +01:00
James Cammarata
da9ae14ff6
Adding new feature - meta: clear_host_errors
...
Allows for the clearing of any failed/unreachable hosts
2016-02-03 14:59:38 -05:00
James Cammarata
46ede563dd
Use templated handler name during callback
...
Fixes #14082
2016-01-23 09:25:50 -05:00
Selivanov Pavel
3201f5d90e
plugins/strategy: added significant details to parser error message.
...
See discussion at
https://github.com/ansible/ansible/issues/13753
2016-01-20 23:12:26 +03:00
Toshio Kuratomi
5e18bc5955
Turn results that come from traceback messages into unicode, not str.
...
Fixes #13964
Fixes #13967
2016-01-18 14:43:55 -08:00
James Cammarata
b5058736ce
Fix set_fact + run_once to assign variables to all hosts in the list
...
Fixes #13921
2016-01-18 14:50:20 -05:00
Brian Coca
c2d314dec5
fix issue with add_hosts overwriting existing vars
...
fixes github.com/ansible/ansible-modules-core/issues/2799 and is alternative to #13841
2016-01-14 17:55:44 -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
15135f3c16
Make sure we're using the original host when processing include results
...
Also fixes a bug where we were passing an incorrect number of parameters to
_do_handler_run() when processing an include file in a handler task/block.
Fixes #13560
2015-12-16 19:13:45 -05:00
James Cammarata
fcc9258b74
Use the original host rather than the serialized one when processing results
...
Fixes #13526
Fixes #13564
Fixes #13566
2015-12-16 01:48:22 -05:00
James Cammarata
f8ff63f8c8
A few tweaks to improve new forking code
2015-12-14 03:06:52 -05:00
James Cammarata
120b9a7ac6
Changing the way workers are forked
2015-12-11 23:35:07 -05:00
Brian Coca
de71171fc2
removed merge conflict
2015-12-11 15:11:26 -05:00
James Cammarata
7f7e730dea
Don't mark hosts failed if they've moved to a rescue portion of a block
...
Fixes #13521
2015-12-11 14:55:44 -05:00
James Cammarata
14e19c239d
Make on_file_diff callback item-aware
2015-12-09 14:52:53 -05:00
James Cammarata
de690445bc
Make fact delegating configurable, defaulting to 1.x behavior
2015-12-08 14:36:33 -05: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
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
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
984729016e
Fix tag filtering on included files and add more debugging
...
Previously, we were filtering the task list on tags for each host
that was including the file, based on the idea that the variables
had to include the host information. However, the top level task
filtering is play-context only, which should also apply to the
included tasks. Tags cannot and should not be based on hostvars.
2015-11-16 17:15:52 -05:00
James Cammarata
5cbeab5a3c
Performance improvements for HostVars and some bugfixes
2015-11-16 17:15:52 -05:00
James Cammarata
13750f68ee
Reduce spinning while waiting on queues
2015-11-12 14:41:09 -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
James Cammarata
f10022dbd2
Fix use of add_tqm_variables
2015-11-05 16:30:03 -05:00
James Cammarata
efbc6054a4
Add variable compression option
2015-11-05 16:22:37 -05:00
James Cammarata
63c47fb271
Fixing up performance
2015-11-05 16:22:37 -05:00
James Cammarata
56e5e72aaa
Make handlers obey run_once (or BYPASS_HOST_LOOP)
...
Fixes #12972
2015-10-30 09:44:35 -04:00
James Cammarata
5d92b00d9c
Cleanup some include logic
...
* Properly mark hosts with failures in includes as failed
* Don't send callbacks until we're sure we're done, and also fix how
we increment stats so failures don't show up as ok's
* Fix a bug in the include file logic where a failed include could lead
to an infinite loop in the task iteration logic
Fixes #12933
2015-10-28 14:02:24 -04:00
James Cammarata
299054852a
Allow tags to be specified in included file params
...
Fixes #12940
2015-10-28 10:14:20 -04:00
James Cammarata
cace91df56
Allow hostvars cache to be invalidated so hostvars contain all hosts after add_host
...
Fixes #12925
2015-10-27 14:12:17 -04:00
James Cammarata
86de1429e5
Cleaning up FIXMEs
2015-10-22 16:03:50 -04:00
James Cammarata
1fa975d81a
Simplify group_by by removing BYPASS_HOST_LOOP from the action
...
Fixes #12825
2015-10-19 14:57:07 -04:00
James Cammarata
892d9b8dfb
Move post_validate for tasks after checking for an include
...
Simplifies logic and prevents us from accidentally post_validating
an include that would otherwise be skipped due to tags causing a
problem because of potentially missing variables.
Fixes #12793
2015-10-19 13:42:17 -04:00
Toshio Kuratomi
baa309309d
Bundle a new version of python-six for compatibility along with some code to make it easy for distributions to override the bunndled copy if they have a new enough version.
2015-10-16 08:21:28 -07:00
James Cammarata
45b803efb4
Properly use test_loader from SharedPluginLoaderObj
2015-10-14 17:53:28 -04:00
James Cammarata
57372906aa
Pull host/group vars when adding hosts/groups
...
Fixes #12582
2015-10-02 02:47:09 -04:00
James Cammarata
a89412ecb1
Fail all hosts if a run_once task fails
...
Fixes #12563
2015-09-29 15:10:00 -04:00
James Cammarata
a3e913da62
Don't assume handlers exist in the same role (if any)
...
Fixes #12536
2015-09-29 14:52:43 -04:00
James Cammarata
46984a067c
Don't wrap vars from include_vars with UnsafeProxy
2015-09-26 15:16:46 -04:00
James Cammarata
cdc6c5208e
Clean string data run through the template engine
...
Also strip UnsafeProxy off of low level srings and objects to ensure
they don't cause issues later down the road
Fixes #12513
2015-09-25 16:49:31 -04:00
James Cammarata
3ffc2783c4
Don't bomb out on handlers with undefined variables in their names
2015-09-22 12:42:02 -04:00
James Cammarata
65bf14cbb0
Merge pull request #12431 from hslee16/devel
...
Stops using _groups_list to check for host when using 'add_host'
2015-09-20 18:17:02 -04:00
James Cammarata
05f6e76407
Template handler names before checking to see if they need to run
...
Fixes #12427
2015-09-18 18:54:48 -04:00
Alex Lee
cf289191e5
return None if group does not exist in inventory groups
2015-09-17 15:58:10 -07:00
Brian Coca
4aea1f6568
normalized plugin paths and names and configs
2015-09-15 11:44:09 -04:00