title: How to setup a default hiera lookup value
body: <p>I am setting up my Puppet code using Hiera such that if a value is not found in Hiera, it assigns a default value to it. I am not getting the desired results and wanted to know how others did it :</p>
  
  <pre><code>lookup( &lt;NAME&gt;, [&lt;VALUE TYPE&gt;], [&lt;MERGE BEHAVIOR&gt;], [&lt;DEFAULT VALUE&gt;] )
  </code></pre>
  
  <p>I think I found the answer 
  <a href="https://www.devco.net/archives/2016/03/13/the-puppet-4-lookup-function.php" rel="nofollow noreferrer">https://www.devco.net/archives/2016/03/13/the-puppet-4-lookup-function.php</a>
  , will try it shortly</p>
  
  <pre><code>lookup({"name" =&gt; "some::thing", "default_value" =&gt; "default"})
  </code></pre>