Commit Graph

27 Commits (792db082597f883148a93c14811b097b7e07d339)

Author SHA1 Message Date
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
10 years ago
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
10 years ago
James Cammarata f7dc5a9515 Minor tweak and comment addition to 974a0ce3 10 years ago
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.
10 years ago
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
10 years ago
James Cammarata 87269599a0 Also consider the full role name when searching for --start-at-task 10 years ago
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. 10 years ago
James Cammarata dcb8caf9e8 Remember if we already skipped tasks via --start-at-task
Fixes #12482
10 years ago
James Cammarata 4156bcedf5 Fix typo in 049a48f 10 years ago
Abhijit Menon-Sen 049a48f3d3 Test state.tasks_child_state before dereferencing
I hit a traceback in the FAILED_TASKS case, but it seemed prudent to add
guards in the other similar branches.
10 years ago
James Cammarata 4ac2bafc4b Set hosts fact gathering flag based on fact cache entries
Fixes #12213
10 years ago
James Cammarata c16961db60 Fix two PlayIterator bugs
* When iterating over a child state, a failure should be propagated
  up so parent blocks don't continue iterating
* Make sure a child state exists before trying to search it

Fixes #12210
10 years ago
Marius Gedminas 823677b490 Replace .iteritems() with six.iteritems()
Replace .iteritems() with six.iteritems() everywhere except in
module_utils (because there's no 'six' on the remote host).  And except
in lib/ansible/galaxy/data/metadata_template.j2, because I'm not sure
six is available there.
10 years ago
James Cammarata 5adcd7054b Allow setup to run when using --start-at-task
Fixes #12147
10 years ago
James Cammarata 601a1cc6d9 Multiple fixes for include statements and blocks in general
Fixes #11981
Fixes #11995
Fixes #12039
Fixes #12077
10 years ago
Brian Coca 245e0dd4b7 made returns from next task consistent to avoid typeerrors, also linear now checks for none
fixes #11965
11 years ago
James Cammarata adb9d7e461 Track role execution per-host, not overall in the role
Fixes #11863
Fixes #11878
11 years ago
James Cammarata eccfb7e0b5 Adding initial support for includes in handlers
Fixes #11694
11 years ago
James Cammarata 135404738e Fix a couple start-at-task issues
* added pattern matching to match v1 functionality
* check the task name, not the task+role name for matches
* make sure the input is unicode

Fixes #11692
11 years ago
James Cammarata e64989beb4 Moving ConnectionInformation -> PlayContext
Also making PlayContext a child class of the Playbook Base class,
which gives it access to all of the FieldAttribute code to ensure
field values are correctly typed after post_validation

Fixes #11381
11 years ago
Brian Coca 171c95672e fixed gathering expression as it was triggering when gather_facts was no 11 years ago
Abhijit Menon-Sen 28e2eae902 Make gathering=explicit work again
There was a confusion between the valid values for defaults.gathering
(explicit/implicit/smart) and a play's gather_facts setting (boolean),
which resulted in gathering=explicit being ignored.
11 years ago
James Cammarata 8d887d8dd3 Adding back --start-at-task feature
Also implemented framework for --step, though it's not used yet
11 years ago
James Cammarata 2576f480fd Restoring a state check to play_iterator, which otherwise broke block functionality 11 years ago
Benno Joy be81b650e8 fixes issue 11286 where role handlers are not run 11 years ago
James Cammarata 4bc7703db3 Fixing some small bugs related to integration tests (v2) 11 years ago
James Cammarata ce3ef7f4c1 Making the switch to v2 11 years ago