Using that approach, the more platforms your hosts will sport, the more “skipping” you’ll see in your playbook runs.
I’d use the group_by module: http://docs.ansible.com/group_by_module.html and use the ansible_distribution fact as a key.
Hope that helps.
Using that approach, the more platforms your hosts will sport, the
more "skipping" you'll see in your playbook runs. I'd use the
group_by module: http://docs.ansible.com/group_by_module.html and
use the ansible_distribution fact as a key. Hope that helps.
thank you for your answer. The group_by - way to do this is also an
option for me but with that I can not encapsulate (and ship)
everything in a single role anymore (galaxy) and the OS split happens
in the playbook (instead of inside the role).
Is it uncommon to have a single role support multiple platforms with
such platform dependent includes as it was my intention?
I currently have 3 target platforms, in the future it might be four -
but certainly not more.
..but after all I still don't know how to assign platform dependent
vars within role/default/main.yml yet (my original question).
Dan Vaida wrote:
I think your other thread to which I replied is related to this as
well.
That is correct - so I merged them into one thread for simplicity.