The targetValue of variables only evaluates to nil if their actual value is undefined.
This case might occur if one defines an inventory value which uses bash / environment variables, which
ook like skipper variables, but actually aren't.
If in the inventory you have
myclass:
test: |
echo "${MY_ENV_VARIABLE}"
Then ${MY_ENV_VARIABLE} would be treated as skipper variable, but without a targetValue, hence it would be
replaced with nil. This PR changes the default behaviour so that these variables are not replaced at all.
The targetValue of variables only evaluates to
nil
if their actual value is undefined. This case might occur if one defines an inventory value which uses bash / environment variables, which ook like skipper variables, but actually aren't.If in the inventory you have
Then
${MY_ENV_VARIABLE}
would be treated as skipper variable, but without atargetValue
, hence it would be replaced withnil
. This PR changes the default behaviour so that these variables are not replaced at all.