Host_collections and ansible variables

Unfortunately, I couldn’t find a way to use facts as a matcher… It may be possible, but I couldn’t figure out how. Maybe someone with more experience in that area will have an answer for you :pray:

@nofaralfasi: thanks for your time …

But you can use at least some facts as matcher:

You just have to make sure to include them in the “Prioritize Attribute Order” table beforehand, then the facts are available as a selection. It works with different “string” facts but not with “host_collections” by the way ansible_local refers to facts created locally under /etc/ansible/facts.d. I now think more and more that it is because the host_collections fact is an array and not a string and therefore the evaluation does not work somehow :frowning:

but it should support arrays:

(hover over ? from “Merge Overrides”