debops / debops-playbooks

Ansible playbooks used by DebOps project
GNU General Public License v3.0
489 stars 88 forks source link

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

Open ypid opened 8 years ago

ypid commented 8 years ago

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?

drybjed commented 8 years ago

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 commented 8 years ago

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

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 :smile:

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

drybjed commented 8 years ago

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