title: How to create default empty dict to combine filter in Ansible?
body: <p>I write a role. In defaults/main.yml I have:</p>
  
  <pre><code>sysctl:
    net.inet.ip.forwarding: 1
    vm.swappiness: 10
  </code></pre>
  
  <p>tasks/main.yml:</p>
  
  <pre><code>- name: Setup sysctl.conf
    sysctl: name="{{ item.0 }}" value="{{ item.1 }}" state=present
    become: yes
    loop: "{{ sysctl_default | combine(sysctl) | dictsort }} "
  </code></pre>
  
  <p>If user doesn't define <code>sysctl</code> in vars ansible will raise an error. Default parameters must be set if user skip this settings. How to create empty dictionary if user ommit sysctl settings in his playbook? Such expression <code>{{ sysctl_default | combine(sysctl | default({})) | dictsort }}</code> doesn't working:</p>
  
  <pre><code>fatal: [192.168.140.96]: FAILED! =&gt; {"msg": "|combine expects dictionaries, got AnsibleUndefined"}
  </code></pre>