- hosts: nginx.gw.api.yohobuy.com
  vars:
    logrotate_scripts:
      - name: gw-api-nginx-log
        paths: 
          - "/Data/logs/nginx/open-service-access.log"
          - "/Data/logs/nginx/open-service-error.com.log"
        options:
          - daily
          - weekly
          - size 50M
          - rotate 7
          - missingok
          - compress
          - delaycompress
          - copytruncate
  remote_user: root
  roles: 
    - logrotate