KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
What is the proper way to check if a variable is undef in a puppet template? In the manifest the variable is defined as follows $myvar = undef How is this checked in the template? Is saw the following two variants <% if @myvar -%> <% end -%> and <% if not @myvar.nil? and @myvar -%> <% end -%> They both seem to work in my case, but I wonder if the first approach fails in on certain cases?
Tags (comma-separated)
Save Edits
Cancel