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

Avoid redundand fallback defaults in templates if they are already in defaults/main.yml #310

Open
ypid opened this issue Sep 15, 2016 · 3 comments
Labels

Comments

@ypid
Copy link
Member

ypid commented Sep 15, 2016

Example: "nginx_hsts_age | default('15768000')" in debops.nginx

I have seen that a number of times in DebOps but I think it does not add much value other than maintenance overhead ;). Thoughts?

@ypid ypid changed the title No redundand fallback defaults in templates if they are already in defaults/main.yml Avoid redundand fallback defaults in templates if they are already in defaults/main.yml Sep 15, 2016
@drybjed
Copy link
Member

drybjed commented Sep 15, 2016

Agreed. Defaults in templates aren't easily changed by the user, so we can drop them and rely on the variables being present in defaults/main.yml. In the specific debops.nginx case and nginx.conf template I was trying to make the number of the variables in defaults smaller, hoping that the user could add their overrides for variables set there through the inventory anyway. But I guess that I just need to get used to long defaults/main.yml files instead. :-)

@ypid
Copy link
Member Author

ypid commented Sep 15, 2016

All right. I guess you can set this to "approved" then 😉

But I guess that I just need to get used to long defaults/main.yml files instead. :-)

Thats what we now have tables of contents in rendered docs and Vim folds in raw files for 😄

Edit: Added "now". DebOps is rapidly evolving and some things would be done differently now.

@drybjed
Copy link
Member

drybjed commented Sep 15, 2016

@ypid Yup, I know. I wasn't using them back then. :-)

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

No branches or pull requests

2 participants