title: ansible: if variable is undefined use default
body: <p>I have simple line in ansible as following </p>
  
  <pre><code>"{{ var1 | join(',') | default('{{ var2.stdout }}') }}"
  </code></pre>
  
  <p>when I define var1 playbook works fine, but when I don't define var1 I get error var1 is undefined. I want to make sure if the var1 is undefine use the default. how can I achieve that without when conditions? </p>