Re: [ansible-devel] include_vars: Option for preserving existing variables from being overwritten

2018-04-13 Thread Andrew Gaffney
You can pass the path to a YAML file to -e/--extra-vars, which allows them
to keep their configuration within a separate file.

--extra-vars @path/to/file.yml

Andrew Gaffney
agaffney.org

On Fri, Apr 13, 2018 at 4:14 AM,  wrote:

> I think extra_vars is not a realistic option for configuring everything,
> as in big projects people have to overwrite many variables and they also
> want to store their configuration within files to keep the ansible runs
> reproduceable.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-devel+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [ansible-devel] include_vars: Option for preserving existing variables from being overwritten

2018-04-12 Thread Brian Coca
You would still have issues with set_fact, vars:, vars_prompt,
register, vars_files and inline vars to include and roles, as
inventory is not very high in the precedence.


One way to avoid this is to have client provide extra vars, which has
highest precedence, instead of inventory.

Another way is you provide your vars in a role as defaults/main.yml,
which has the lowest precedence, instead of include_vars.



-- 
--
Brian Coca

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-devel+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.