vars precedence

36 views
Skip to first unread message

dead_g...@hotmail.com

unread,
Jun 19, 2018, 12:12:07 PM6/19/18
to Ansible Project
Hello there!

I'm having issues with vars precedence, hope you can help me here.

I'm currently using geerlingguy.ansible-role-postgresql as a dependency of my own postgresql role. Is define as a dependency in meta and I'm using import_role in my main task.

I was using vars/main.yml on my own role to override the defaults but now I need to extend my own role a bit like defining diferent variables depending from which group is the server in the inventory.

For this I use group_vars but with the vars/main.yml hack is impossible to override.

What would be the best practice here?

Best,
Miracle Max

Laurent Hoss

unread,
Jun 13, 2019, 11:08:22 AM6/13/19
to Ansible Project
> For this I use group_vars but with the vars/main.yml hack is impossible to override.

- An earlier post with the same or similar question:

- Please upvote your favorite solution, in the proposals I gathered in following post:
Reply all
Reply to author
Forward
0 new messages