On Mon, 9 Nov 2020 02:42:40 -0800 (PST)
"[email protected]" <[email protected]> wrote:

> *├── group_vars*
> *│   └── all.yml*
> *├── hosts*
> *│   └── localhost*
> *└── playbooks*
> *    └── main.yml*
> 
> The problem here is that the group_vars are not loaded in this 
> configuration, they would need to be moved either under the 'hosts' 
> inventory directory or under the playbooks directory.
>  Is there any way to make the above structure work? 

No. It is not. See "Organizing host and group variables"
https://docs.ansible.com/ansible/latest/user_guide/intro_inventory.html#organizing-host-and-group-variables

  "Ansible loads host and group variable files by searching paths
  relative to the inventory file or the playbook file."

IMHO, the simplest workaround would be a symlink.


-- 
Vladimir Botka

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/20201109121510.1b7ab208%40gmail.com.

Attachment: pgpMzmuvqrrUm.pgp
Description: OpenPGP digital signature

Reply via email to