Fixed the variable checking in this template to avoid warning messages
from puppet 2.7+