Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Easy config using group_vars instead of role-bound vars #39

Closed
lisael opened this issue Sep 24, 2013 · 4 comments
Closed

Easy config using group_vars instead of role-bound vars #39

lisael opened this issue Sep 24, 2013 · 4 comments

Comments

@lisael
Copy link
Contributor

lisael commented Sep 24, 2013

We could gather all vars in a single file, and even use string replacement to make config as simple as:

https://gist.github.com/lisael/f9af1d96b1323c56ec8c

this allow the user to keep all control over her config but also provides a sensible default config with minimal pain.

@brucespang
Copy link
Contributor

Another nice thing about having a single config file is that it would make merge conflicts less likely when updating sovereign.

@al3x
Copy link
Contributor

al3x commented Sep 24, 2013

I like it. It does decrease the "modularity" of each of the roles, and it isn't in keeping with Ansible conventions, but hey rules are made to be broken ;) I'd love to see a pull request!

@gregkare
Copy link
Contributor

I agree, it would be really convenient to have one global file to override configuration from all the roles. That file could even be added to .gitignore with a sample showing all the variables you can use. I'm new to Ansible but I'm going to play with overrides and see what I can do.

@gregkare
Copy link
Contributor

My pull request above is a proposal using vars_files. I wanted to use group_vars but the variables from the roles had precedence, so I ended up with this. What do you think?

Obviously it needs documentation, but I don't want to document this if it's a wrong way to do this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants