What is the order of role-specific vs. imported handlers and can it be changed?

Dear @bvitnik , @flowerysong, thanks for your ideas and suggestions. I clearly want to stay with the centrally managed handlers and not add code redundancy to our Ansible setup. IMHO this is generally much easier to maintain, even though it might come with some small additional complexity :slight_smile:. Our central “library” role contains anyway much more than just handlers (like parametrizable generic task “templates” ecc.).

@bvitnik’s idea of importing the library as a role is interesting. As a variant of this, I am now importing the library handler as first task in the role’s handler file (roles/xxx/handlers.main.yml)

---
- name: "Import library handlers"
  ansible.builtin.import_tasks: roles/library/handlers/main.yml

- name: ....

This ensures the right order. I’m still considering adding the complete role as suggested by @bvitnik, though.