I did see that...  I have to go back and try it again, but I think it was
still reading in all of the handlers for some reason.  I did think about
just putting the handler in that tasks file too...  hadn't yet tried that
one, but I am pretty sure that would work too.


On Mon, Feb 12, 2024 at 9:32 AM Vinay Mulugund <[email protected]> wrote:

> This seems similar to something you are looking for:
>
> https://stackoverflow.com/questions/75134796/ansible-handlers-per-operating-system-with-same-name
>
> On Friday, February 9, 2024 at 5:12:06 AM UTC+5:30 John Petro wrote:
>
>> Good Evening...  A coworker of mine is working on finishing up a role,
>> that may be use across multiple operating systems.  We were wondering, if
>> there was a way to separate the handler files into files based on OS, that
>> are only parsed when you are running the role against that particular OS.
>>
>> For example, if you were running the role against a windows server, the
>> handler would be in windows.yml, or if it was debian, then the handler
>> would be in Debian.yml.
>>
>> I know how to do this for the tasks files, but wasn't sure if this was
>> possible for handlers files.
>>
>> --John
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Ansible Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/88253787-22e0-43cd-ad6a-a3362a1f717fn%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/88253787-22e0-43cd-ad6a-a3362a1f717fn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAPAjob_vDo2jJ5t0%3DTqVMZgUBiQUwr0z9OUQaNA3fa%3D69Dja1A%40mail.gmail.com.

Reply via email to