title: How can I setting up logrotation with ansible?
body: <p>I have this in my playbook:</p>
  
  <pre><code>---
  - name: Set Up syslog-ng Server
    hosts: localhost
    tasks:
      - name: Log Rotation for log
        logrotate: name=man_vc.log path="/var/log/man_vc.log"
          args:
            options:
              - daily
              - size 25M
              - rotate 8
              - missingok
              - compress
              - delaycompress
              - copytruncate
  </code></pre>
  
  <p>And when I run it I get this error:</p>
  
  <pre><code>ERROR! Syntax Error while loading YAML.
  
  
  The error appears to have been in '/apps/cman/scripts/ansible/playbooks/syslog-ng_server.yaml': line 11, column 13, but may
  be elsewhere in the file depending on the exact syntax problem.
  
  The offending line appears to be:
  
        logrotate: name=man_vc.log path="/var/log/man_vc.log"
          args:
              ^ here
  
  exception type: &lt;class 'yaml.scanner.ScannerError'&gt;
  exception: mapping values are not allowed in this context
    in "&lt;unicode string&gt;", line 11, column 13
  </code></pre>