title: Escape single curly brace in ansible variable
body: <p>I am using ansible to read the list of RPM's installed on my redhat host and would like to specify a format as well. How can I escape single curly braces in my command string? </p>
  
  <pre><code>- hosts: localhost
    gather_facts: no
    tasks:
    - name: rpm -qa
      command: rpm -qa --qf "{NAME}: %{VERSION}\n" | sort
      register: rpmout
  
    - debug:
        msg: Your rpms are {{ rpmout.stdout }}
  </code></pre>
  
  <p>Output from running the above playbook:</p>
  
  <pre><code>$ ansible-playbook -vvv ./a.yml 
  ansible-playbook 2.7.10
    config file = None
    configured module search path = [u'/home/ansible/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
    ansible python module location = /usr/lib/python2.7/site-packages/ansible
    executable location = /usr/bin/ansible-playbook
    python version = 2.7.5 (default, Apr  9 2019, 14:30:50) [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)]
  No config file found; using defaults
  /etc/ansible/hosts did not meet host_list requirements, check plugin documentation if this is unexpected
  /etc/ansible/hosts did not meet script requirements, check plugin documentation if this is unexpected
  Parsed /etc/ansible/hosts inventory source with ini plugin
  ERROR! Syntax Error while loading YAML.
    mapping values are not allowed in this context
  
  The error appears to have been in '/home/ansible/a.yml': line 5, column 34, but may
  be elsewhere in the file depending on the exact syntax problem.
  
  The offending line appears to be:
  
    - name: rpm -qa
      command: rpm -qa --qf "{NAME}: %{VERSION}\n" | sort
                                   ^ here
  </code></pre>