diff --git a/cdist/conf/type/__postgres_role/gencode-remote b/cdist/conf/type/__postgres_role/gencode-remote index 8fb2c91d..65a9d588 100755 --- a/cdist/conf/type/__postgres_role/gencode-remote +++ b/cdist/conf/type/__postgres_role/gencode-remote @@ -20,8 +20,8 @@ name="$__object_id" state_is="$(cat "$__object/explorer/state")" -state_should="$(cat "$__object/parameter/state")" -[ ! "$state_should" ] && state_should="present" +state_should="present" +[ -f "$__object/parameter/state" ] && state_should="$(cat "$__object/parameter/state")" [ "$state_is" = "$state_should" ] && exit 0