lukasjarosch / skipper

Inventory based templated configuration library inspired by the kapitan project
https://lukasjarosch.github.io/skipper/
MIT License
11 stars 3 forks source link

feat: ignore variables with targetValue `nil` #72

Closed lukasjarosch closed 1 year ago

lukasjarosch commented 1 year ago

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.