On 12.07.2019 12:12, Bruno Cochofel wrote: > I have some roles that are specific for some OS family and I'm using the > include keyword to include a file when ansible_os_family matches what I > want. > The problem with this approach is that when is not the family I want it > skips but at the end the user that runs this can think that everything was > done. > > I want to know what's the best approach for this, thinking that I also need > to tell the user (even fail the task in question) based on the OS being > different that what it should be.
If you want to fail the assert module is a good candidate https://docs.ansible.com/ansible/latest/modules/assert_module.html -- Kai Stian Olstad -- 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 post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/55002d16-3ad6-7bef-2967-59762d6f7f41%40olstad.com. For more options, visit https://groups.google.com/d/optout.
