Commit Graph

33 Commits (a3cdd831b35b17338a4b8f8a1c3851f4aaeb1f00)

Author SHA1 Message Date
Martin Krizek a3cdd831b3
handlers: fix executing in lockstep using linear (#83030)
Fixes #82307
2 months ago
snipfoo 8328153121
Run all handlers with the same `listen` topic when notified from another handler (#82364)
Fixes #82363
6 months ago
Martin Krizek d664f13b4a
Allow include_tasks handlers for searching role subdirs (#82248)
Fixes #82241
6 months ago
Martin Krizek a8b6ef7e7c
flush_handlers: handle a failure in a nested block with force_handlers (#81572)
Fixes #81532

ci_complete
7 months ago
Martin Krizek fe94a99aa2
any_errors_fatal fixes (#78680)
Fixes #31543
Fixes #36308
Fixes #73246
Fixes #80981
Fixes #81533

ci_complete
7 months ago
Martin Krizek 2d5861c185
run_once: unnotify hosts on handlers that are not run (#81667)
Fixes #81666
8 months ago
Martin Krizek 1e7f7875c6
Allow for searching handler subdir for included task via include_role (#81733)
Fixes #81722
8 months ago
Martin Krizek 98f1627817
include_role: expose vars from parent roles to role's handlers (#81524)
* include_role: expose vars from parent roles to role's handlers

Fixes #80459
10 months ago
Martin Krizek 0cba3b7504
Last handler with same name wins for listen too (#81358)
Fixes #49371
Fixes #81013
10 months ago
James Cammarata 660f1726c8
Register handlers immediately if currently iterating handlers (#80898)
This fixes the issue where handlers notifying other handlers are
not properly run because the notification is not registered unless
another flush_handlers occurs. Instead, if the current host state
is iterating handlers we immediately register the handler to be
run so the notification is not lost.

Fixes #80880
12 months ago
Martin Krizek 09dd80b4ec
Last handler defined runs, fix for roles (#79558)
Fixes #73643
* clear_notification method and simplify ifs
* Deduplicate code
* Limit number of Templar creations
* Fix sanity
* Preserve handler callbacks order as they were notified
1 year ago
Martin Krizek bd329dc543
Make using blocks as handlers a parser error (#79993)
Fixes #79968
1 year ago
Martin Krizek 10eda5801a
Fix conditionally notified include handlers (#79804)
Fixes #79776

ci_complete
1 year ago
Martin Krizek e1daaae42a
Fix using FQCN for flush_handlers (#79057)
Fixes #79023
2 years ago
Martin Krizek 811093f022
Move handler processing into new PlayIterator state (#77955)
Fixes #46447
Fixes #52561
Fixes #54991
Fixes #64611
Fixes #64999
Fixes #65067
Fixes #72725
Fixes #72781
Fixes #77616
2 years ago
Martin Krizek ce6c9befb8
Do not allow handlers from dynamic includes to be notified (#78399)
* Do not allow handlers from dynamic includes to be notified
2 years ago
Martin Krizek e9af6efee6
Raise a proper error when include/import_role is used as a handler (#77807) 2 years ago
Sloane Hertel c8d413164d
ignore/warn for undefined vars in unused handler names (#75244)
* Make undefined variables in handler names non-fatal if the handler is not used

* If the handler has no way to be notified (i.e. the name can't be templated and the handler has no listen topics), display a warning

* Add tests for variables in handler names

* changelog
3 years ago
Rick Elrod 738132da95
[ansible-test] add freebsd/13.0 remote (#74328)
Change:
- FreeBSD 13.0 was released on the 13th, add it to ansible-test.

Test Plan:
- ci_complete

Signed-off-by: Rick Elrod <rick@elrod.me>
3 years ago
David Shrewsbury 1e5ccb326f
Allow for searching handler subdir for included tasks (#73809)
* Allow for searching handler subdir for included tasks
3 years ago
Sloane Hertel c870457339 free strategy - include failed hosts that were notified (#65576)
* free strategy - include failed hosts that were notified so --force-handlers is used

* trim line length a bit

* Loop over the force handler tests with the strategies linear and free

* rename changelog

* Use the play iterator instead of TQM for accurate failure representation in blocks

* Remove hack in a backwards compatible way for 3rd party plugins
5 years ago
Sam Doran c485a1b91e
Fix sanity tests based on newer version of shellcheck (#60423)
- change egrep to grep -E
- store exit codes and check them directly
- ignore SC1091
5 years ago
Sloane Hertel ec1287ca7e
Fix notifying handlers by using an exact match (#55624)
* Fix notifying handlers by using an exact match rather than a string subset if listen is text rather than a list

* Enforce better type checking for listeners

* Share code for validating handler listeners

* Add test for handlers without names

* Add test for templating in handlers

* Add test for include_role

* Add a couple notes about 'listen' for handlers

* changelog

* Add a test for handlers without names

* Test templating in handlers

* changelog

* Add some tests for include_role

* Add a couple notes about 'listen' for handlers

* make more sense

* move local function into a class method
5 years ago
Martin Krizek 0e28ab4528
Template run_once for handlers (#54030)
Fixes #27237
5 years ago
Matt Clay 35761a99c6 Make sure force_handlers is off for handlers test. 5 years ago
Brian Coca 88c87a3583
added handlers_from (#49220)
* added handlers_from

fixes #46769
6 years ago
Pablo 6497049f2a Fix exception when including tasks from handlers (#47307)
Set _notified_handlers for the task's _uuid that is run as a handler

Fix #47287
6 years ago
Martin Krizek 0eece38cdf Fix any_errors_fatal in meta tasks (#36870) 6 years ago
Will Thames ef8c9798d3 include_role handlers bug fix (#26335)
* Ensure that include_role properly fires handlers

include_role needs to ensure that any handlers included
with the role are added to the _notified_handler and
_listening_handler lists of the TaskQueueManager, otherwise
it fails when trying to run the handler.

Additionally, the handler needs to be added to the
PlayIterator's `_uuid_cache` or it fails after running
the handler

Add more uuid debug statements - this code was hard
to debug with existing debug statements, so add more
uuid information at little additional output cost.

Fixes #18411

* Add tests for include_role handlers

Tests for #18411
7 years ago
Rene Moser 6c2af29659 tests: add handler listen test cases 8 years ago
James Cammarata 4f06a86161 Alternately track listening handlers by uuid if no name is set
Fixes #17846
8 years ago
Pierre-Louis Bonicoli 3edac76e1b tests: check that handlers are able to use 'include' 8 years ago
Matt Clay 80a5c70ad7 Split integration tests out from Makefile. (#17976) 8 years ago