Where to store global defaults?

73 views
Skip to first unread message

Bence Takács

unread,
May 29, 2015, 9:43:12 AM5/29/15
to ansible...@googlegroups.com
Hi, All

Where should I store my global variables? Like company artifact repository url, application directory (/opt), etc?

Is there a proper place to put that?

I was thinking about ansible.cfg but this would be overkill.
It's not for hosts, not for groups, not for playbooks...

Regards:
   Bence

Bence Takács

unread,
May 29, 2015, 10:24:24 AM5/29/15
to ansible...@googlegroups.com
First I tried to put that into hosts file, but did not work:

[all:vars]
nexus_url=...
app_dir=/opt
...but did not work

Then I came up with the following solution:
group_vars/all:
---
nexus_url: ...
app_dir: /opt

And it is working and seems to be a clean colution for me

Regards:
   Bence
Reply all
Reply to author
Forward
0 new messages