Hi,
In my roles I use the following Handler definition:
`
- name: restart prometheus
include: “roles/common/tasks/restart-service.yml service_name=prometheus”
`
This works fine in 2.7.10.
After updating to 2.8.0 I got the following error:
ERROR! The requested handler ‘restart prometheus’ was not found in either the main handlers list nor in the listening handlers list
I have tried several variants:
`
- name: restart prometheus
import_tasks: roles/common/tasks/restart-service.yml
vars:
service_name: prometheus
`
Same Problem.
If I use a simple debug statement it works:
`
- name: restart prometheus
debug:
msg: System {{ inventory_hostname }} has uuid {{ ansible_product_uuid }}
`
I realize that you should avoid dependencies between roles but repeating a block of code over and over doesn’t seem to be a good solution either.
Any idea?
Regards Philipp