I run that role against a given inventory that attempts to override that variable:
`
[elk]
node1 es_heap=2G
[elk:vars]
es_heap=2G
`
Tried overriding with both host and group vars, but I keep getting the role variable. Aren’t the former supposed to override the latter? I also tried moving the variable from the role in /vars/main.yml, but that had no effect. I must be missing something, because having host variable override role variable seems pretty basic.
I’m not sure why I’d ever want to use vars/ then. Sure I could be convinced of a use-case, but it seems much more natural for inventory/group/host vars to override anything defined in a role, but I see this discussion has taken place before.
Iâm not sure why Iâd ever want to use vars/ then. Sure I could be
convinced of a use-case
A use case I've seen, which doesn't seem all that uncommon, is when you
want to use a given role with multiple inventories, each of which has its
own inventory/group/host vars structure. Putting the default in the role
lets you have it in one place, and be confident that it's consistent
across your various inventories unless you explicitly override it.
-Josh (jbs@care.com)
This email is intended for the person(s) to whom it is addressed and may contain information that is PRIVILEGED or CONFIDENTIAL. Any unauthorized use, distribution, copying, or disclosure by any person other than the addressee(s) is strictly prohibited. If you have received this email in error, please notify the sender immediately by return email and delete the message and any attachments from your system.