Toni Mueller
unread,May 28, 2020, 2:52:52 PM5/28/20Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ansible...@googlegroups.com
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