title: Ansible playbook. Always quote template expression brackets when hey contain a value
body: <p>I am getting error running this ansible playbook. It simply tries to load from ansible facts, an attribute (the size) of a specific mount by looking in mount_points within ansible facts. (i) My variable expression is quoted wrongly somehow, have tried a few permutations of brackets and quotes. (ii) Once I take care of fixing the quoting, would the underlying command actually find the and extract the required fact attribute into my variable <code>mountsize</code>?</p>
  
  <pre><code>- hosts: target_hosts
    vars:
      mountsize: "999"
    tasks: 
      - name: Collect only facts returned by facter
        setup:
          fact_path : "/etc/ansible/facts.d"
  
      - debug: 
          var: "{{ ansible_facts['ansible_mounts' | selectattr('mount', 'equalto', '/apps') | map(attribute='size_total') | "{{mountsize}}"] }}"
  </code></pre>
  
  <p>Expected example output of mountsize in bytes:
  234567891012</p>