title: Ansible cron job does not escape percent sign `%`
body: <p>Trying to create a cron job to collect dpkg.logs and ship them to an s3 bucket.
  The task flows as below:</p>
  
  <pre><code>- name: Configure cron job to export patch logs
    cron:
      name: export patch logs daily
      minute: 0
      hour: 0
      user: root
      cron_file: patch_logs
      job: "/usr/local/bin/aws s3 cp /var/log/dpkg.log s3://'{{ patch_logs_bucket }}'/dpkg.log.$(hostname).$(date +\%F)"
  </code></pre>
  
  <p>But, ss described in man crontab, percent-signs must be escaped. That is why you see a backslash before percent sign.</p>
  
  <pre><code>man (5) crontab:
  
  Percent-signs (%) in the command, unless escaped with backslash (\), 
  will be changed into newline characters, and all data after the 
  first % will be sent to the command as standard input.
  </code></pre>
  
  <p>Problem is, Ansible fails to execute the task:</p>
  
  <pre><code>--&gt; Action: 'converge'
  ERROR! Syntax Error while loading YAML.
    found unknown escape character '%'
  
  The error appears to have been in '/Users/&lt;user&gt;/&lt;directory&gt;/&lt;to&gt;/&lt;ansible_project&gt;/tasks/base.yml': line 132, column 115, but may
  be elsewhere in the file depending on the exact syntax problem.
  
  The offending line appears to be:
  
      cron_file: patch_logs
      job: "/usr/local/bin/aws s3 cp /var/log/dpkg.log s3://'{{ patch_logs_bucket }}'/dpkg.log.$(hostname).$(date +\%F)"
                                                                                                                    ^ here
  We could be wrong, but this one looks like it might be an issue with
  missing quotes.  Always quote template expression brackets when they
  start a value. For instance:
  
      with_items:
        - {{ foo }}
  
  Should be written as:
  
      with_items:
        - "{{ foo }}"
  </code></pre>
  
  <p>I have tried to ignore the escape of percent and just leave it as <code>$(date +%F)</code>, but cron job is created wrongly.
  Any ideas?!</p>