---
dependencies:
  - role: meta/repository
    repository_key: '0x4f4ea0aae5267a6c'
    repository_url: 'deb http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu trusty main'
  - role: meta/monitor
    monitor_name: php5-fpm
    monitor_runtime_root: "{{ php_runtime_root }}"
    monitor_pidfile: "{{ php_fpm_pidfile_path }}"

  - role: package/fluentd
    fluentd_sources:
      - path: "{{ php_fpm_log_path }}"
        format: '^\[(?<date_time>(?<date>[^ ]*) (?<time>[^]]*)[^]]*)\] (?<notice>\w+): (?<message>.*)'
        tag: php.service
      - path: "{{ php_error_log_path }}"
        format: '^\[(?<date_time>(?<date>[^ ]*) (?<time>[^ ]*) (?<timezone>\w*)\]*) (?<type>[\w\s]+):\s+(?<message>.*)'
        tag: php.error
      - path: "{{ php_slow_log_path }}"
        format: '^.*'
        tag: php.slow

  - role: package/logrotate
    logrotate_name: php
    logrotate_notify_pidfile: "{{ php_fpm_pidfile_path }}"

---
dependencies:
  - role: meta/repository
    repository_key: '0x4f4ea0aae5267a6c'
    repository_url: 'deb http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu trusty main'
  - role: meta/monitor
    monitor_name: php5-fpm
    monitor_runtime_root: "{{ php_runtime_root }}"
    monitor_pidfile: "{{ php_fpm_pidfile_path }}"

  - role: package/fluentd
    fluentd_sources:
      - path: "{{ php_fpm_log_path }}"
        format: '^\[(?<date_time>(?<date>[^ ]*) (?<time>[^]]*)[^]]*)\] (?<notice>\w+): (?<message>.*)'
        tag: php.service
      - path: "{{ php_error_log_path }}"
        format: '^\[(?<date_time>(?<date>[^ ]*) (?<time>[^ ]*) (?<timezone>\w*)\]*) (?<type>[\w\s]+):\s+(?<message>.*)'
        tag: php.error
      - path: "{{ php_slow_log_path }}"
        format: '^.*'
        tag: php.slow

  - role: package/logrotate
    logrotate_name: php
    logrotate_notify_pidfile: "{{ php_fpm_pidfile_path }}"
    logrotate_create_logs_with_owner: "{{ php_user }}"

Revert "Modified existing logrotate template to utilize royston's manual configuration."
Revert "Modified existing logrotate template to utilize royston's manual configuration."

This reverts commit e24cc54c7526904e4609297d74f21ee7eeb29cb4.
