Project

General

Profile

Actions

Feature #459

closed

Parameters should be allowed to be blank

Added by Jisakiel Kiel over 13 years ago. Updated over 11 years ago.

Status:
Duplicate
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
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.

Actions #1

Updated by Ohad Levy about 13 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?

Actions #2

Updated by Jisakiel Kiel about 13 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...

Actions #3

Updated by Ohad Levy almost 13 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.

Actions #4

Updated by Ohad Levy almost 12 years ago

  • Tracker changed from Bug to Feature
Actions #5

Updated by Benjamin Papillon over 11 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

Actions

Also available in: Atom PDF