Hi,
I would like to create a data structure which resembles a (virtual)
host, but in a replicated fashion. Say, I have a number of nodes, and
now I want to create the same "vhost" on a subset of them, for
redundancy.
I'm having trouble expressing that in an inventory because only the
nodes exist, but the "vhost" not (obviously?). For ease of use, I would
rather not care about what or where the nodes actually are, but treat
those "vhosts" as hosts with an attribute like "place on these nodes: 1,
2, 3, ...".
If any given "vhost" would have to be placed on only one node, I'd just
set the 'ansible_host' variable accordingly.
What would be the best practice for this use case?
I am using Ansible 2.8 and 2.9, if that helps.
Thank you!
Cheers,
Toni