Feature #459
closed
Parameters should be allowed to be blank
Added by Jisakiel Kiel over 13 years ago.
Updated over 11 years ago.
Description
There are many valid uses for a blank parameter (say, overriding $sudo_users for a host ). However foreman does not accept a blank, and if given "" it returns "\"\"" when used as a external node provisioning tool.
I tried removing the :value checks in in app/models/parameters.rb and it accepts into the database empty values. However it still doesn't work adding a parameter with no value to a host: it doesn't reject it but it doesn't save it either.
- Status changed from New to Feedback
the design at the moment relay on having blank parameters as a way to identify delete parameters.
can you provide some more usage cases for empty values?
I just checked in my templates... I mainly use it for defining base configs for a whole "zone" (say, sudo_users=["sysadmin1", "sysadmin2"], netbackup=["server1", "server2"] or time_servers=["x.y.z.t"] ), and then overriding it for specific hosts or zones (say, "zone_devel" without backup servers and with diferent sudo_users - in my particular case, sudo_users=[] and then sudo_users_nopasswd=["whomever"]).
Hope it helps clarifying my use cases...
we are currently working on a rework for more generic parameters, we'll try to find a way to include blank values as well.
- Tracker changed from Bug to Feature
- Status changed from Feedback to Duplicate
Hello,
This is a duplicate of #215. I'm also waiting for this one :) in the mean time, here we use the word "none" in our variable content to check for existence.
Benjamin
Also available in: Atom
PDF