I’m trying to create a playbook in which I have a single role though I expect this will expand with time. I want to load the variables in a file per play_host. I think I can include the variable file with the same name as the host with .yml or .yaml suffix in ./host_vars or ./group_vars/<role_name> relative to the location of the inventory. However Ansible complains that these host variable files are not found unless they are in the same directory as the main playbook and inventory file.
The variable files are in ./host_vars. The main playbook & inventory are ./site.yml & ./hosts, the role playbook is ./<role_name>/main.yml and is as below.