title: default value for dictionary in jinja2 (ansible)
body: <p>jinja2 has filter '|default()' to works with undefined variables. But it does not work with dictionary values.</p>
  
  <p>if D may have or not have key foo (D[foo]), than:</p>
  
  <pre><code>{{ D[foo]|default ('no foo') }}
  </code></pre>
  
  <p>will prints 'no foo' if D is undefined, but will cause error ('dict object' has no attribute 'foo') if D is defined, but D[foo] is undefined.</p>
  
  <p>Is any way to make default for dictionary item?</p>