1

I know that there are several ways of defining variables like:

  • Inside Inventory
  • Inside Playbook
  • Inside Include Files
  • Inside host_vars and groups_var Variables Per host and group.

But how to create place, file, whatever to store variables for ALL hosts similar to host_vars.

Is it Even Possible? I know that it is possible to include a file with variables, but i want to know, is it possible to import them automatically like host_vars.

1 Answer 1

1

all is an implicit group with the inventory system.

You could create group_vars/all.yml and put the variables in there.

Several other ways to do it also, I'd think.

The variables doco says you can use variables from (automatically) included files just like roles does.

1
  • So all is the group itself. Thanks - i will also check for roles. It looks like he wanted to say group_var/all.yml (this is the way how it is described in documentation he provided). Commented Feb 25, 2020 at 20:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .