Multiple "all" groups?

33 views
Skip to first unread message

Jacob Weber

unread,
Nov 13, 2014, 2:51:14 PM11/13/14
to ansible...@googlegroups.com
I know we can have group_vars/all, which will apply to all hosts. But is there a way to make a second group_vars file that will also apply to all hosts?

I ask because I'd like to have a Vault-encrypted vars file, in addition to an unencrypted one. If it was only for a specific group X, I would create a second group Y, with X as a child, and then create group_vars/X and group_vars/Y. But I'm not sure if I can do this for a group that applies to all hosts.

Thanks.

Serge van Ginderachter

unread,
Nov 13, 2014, 3:13:38 PM11/13/14
to ansible...@googlegroups.com

On 13 November 2014 20:51, Jacob Weber <weber...@gmail.com> wrote:
I know we can have group_vars/all,

e​very group_vars file can also be a directory where all the yaml files within will be evaluated​

Michael Peters

unread,
Nov 13, 2014, 3:17:00 PM11/13/14
to ansible...@googlegroups.com
You can have a directory underneath group_vars. Something like:

group_vars/all/
+ secret.yml
+ public.yml

Where secret.yml is vault encrypted.
> --
> 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 ansible-proje...@googlegroups.com.
> To post to this group, send email to ansible...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/cb48e1f8-fac7-4e03-bee0-bcadc26b33da%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Jacob Weber

unread,
Nov 13, 2014, 3:18:01 PM11/13/14
to ansible...@googlegroups.com
Ah, didn't know that. Thanks!

Brian Coca

unread,
Nov 13, 2014, 3:24:51 PM11/13/14
to ansible...@googlegroups.com
you can make it into a dir:

group_vars/all/cleartext
group_vars/all/valuted



--
Brian Coca
Reply all
Reply to author
Forward
0 new messages