Project

General

Profile

Feature #459

Parameters should be allowed to be blank

Added by Jisakiel Kiel over 10 years ago. Updated over 8 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

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.

History

#1 Updated by Ohad Levy about 10 years ago

  • 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?

#2 Updated by Jisakiel Kiel about 10 years ago

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...

#3 Updated by Ohad Levy almost 10 years ago

we are currently working on a rework for more generic parameters, we'll try to find a way to include blank values as well.

#4 Updated by Ohad Levy almost 9 years ago

  • Tracker changed from Bug to Feature

#5 Updated by Benjamin Papillon over 8 years ago

  • 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