parameter default handling in __key_value type corrected
This commit is contained in:
parent
360b42e892
commit
b75481a4d4
3 changed files with 4 additions and 4 deletions
|
@ -21,8 +21,8 @@
|
|||
|
||||
key="$__object_id"
|
||||
[ -f "$__object/parameter/key" ] && key="$(cat "$__object/parameter/key")"
|
||||
state_should=present
|
||||
[ -f "$__object/parameter/state" ] && state_should="$(cat "$__object/parameter/state")"
|
||||
|
||||
state_should="$(cat "$__object/parameter/state")"
|
||||
|
||||
file="$(cat "$__object/parameter/file")"
|
||||
delimiter="$(cat "$__object/parameter/delimiter")"
|
||||
|
|
|
@ -19,8 +19,7 @@
|
|||
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
state_should=present
|
||||
[ -f "$__object/parameter/state" ] && state_should="$(cat "$__object/parameter/state")"
|
||||
state_should="$(cat "$__object/parameter/state")"
|
||||
|
||||
if [ "$state_should" = "present" -a ! -f "$__object/parameter/value" ]; then
|
||||
echo "Missing required parameter 'value'" >&2
|
||||
|
|
1
cdist/conf/type/__key_value/parameter/default/state
Normal file
1
cdist/conf/type/__key_value/parameter/default/state
Normal file
|
@ -0,0 +1 @@
|
|||
present
|
Loading…
Reference in a new issue