I have a playbook similar to the one below which uses the base_acl variable. Let's pretend base_acl: "default_acl.j2. I have a host that I want to use a different base_acl value for. I've looked over the ansible precedence docs and don't see a way to do this other than using --extra-vars on the command line which I don't want to do.
I've tried defining base_acl in a host_vars file (should have higher precedence according to link above?) for the host in question, however the play still prints "playbook" for the variable value when run.
Is there a way to tell ansible to give host_vars precedence over playbook variables?
---
- hosts: all
gather_facts: no
vars:
base_acl : "playbook"
tasks:
- debug: msg="variable is {{ base_acl }}"