---
driver_plugin: vagrant

platforms:
- name: ubuntu-14.04
  run_list:
  - recipe[apt]

- name: ubuntu-12.04
  run_list:
  - recipe[apt]

- name: ubuntu-10.04
  run_list:
  - recipe[apt]

- name: debian-7.4
  run_list:
  - recipe[apt]

- name: centos-7.0

- name: centos-6.4

- name: centos-5.10

suites:
- name: default
  run_list:
  - recipe[minitest-handler]
  - recipe[postgresql]
  attributes: {}

- name: contrib
  run_list:
  - recipe[postgresql::contrib]
  attributes:
    postgresql:
      password:
        postgres: "iloverandompasswordsbutthiswilldo"

- name: apt-pgdg-client
  run_list:
  - recipe[minitest-handler]
  - recipe[postgresql]
  excludes: ["centos-5.10", "centos-6.4", "centos-7.0"]
  attributes:
    postgresql:
      enable_pgdg_apt: true
      version: "9.3"

- name: yum-pgdg-client
  run_list:
  - recipe[minitest-handler]
  - recipe[postgresql]
  excludes: ["ubuntu-10.04", "ubuntu-12.04", "ubuntu-14.04", "debian-7.4"]
  attributes:
    postgresql:
      enable_pgdg_yum: true
      version: "9.3"
      client:
        packages: ["postgresql93"]

- name: ruby
  run_list:
  - recipe[postgresql::ruby]
  - recipe[minitest-handler]
  attributes: {}

- name: server
  run_list:
  - recipe[postgresql::ruby]
  - recipe[minitest-handler]
  - recipe[postgresql::server]
  attributes:
    postgresql:
      password:
        postgres: "iloverandompasswordsbutthiswilldo"

- name: apt-pgdg-server
  run_list:
  - recipe[minitest-handler]
  - recipe[postgresql::ruby]
  - recipe[postgresql::server]
  excludes: ["centos-5.10", "centos-6.4", "centos-7.0"]
  attributes:
    postgresql:
      enable_pgdg_apt: true
      version: "9.3"
      password:
        postgres: "iloverandompasswordsbutthiswilldo"
      config:
        ssl_cert_file: "/etc/ssl/certs/ssl-cert-snakeoil.pem"
        ssl_key_file: "/etc/ssl/private/ssl-cert-snakeoil.key"

- name: yum-pgdg-server
  run_list:
  - recipe[minitest-handler]
  - recipe[postgresql::ruby]
  - recipe[postgresql::server]
  excludes: ["ubuntu-10.04", "ubuntu-12.04", "ubuntu-14.04", "debian-7.4"]
  attributes:
    postgresql:
      enable_pgdg_yum: true
      version: "9.3"
      server:
        packages: ["postgresql93-server"]
        service_name: "postgresql-9.3"
      password:
        postgres: "iloverandompasswordsbutthiswilldo"

- name: apt-pgdg-client-ruby
  run_list:
  - recipe[minitest-handler]
  - recipe[postgresql]
  - recipe[postgresql::ruby]
  excludes: ["centos-5.10", "centos-6.4", "centos-7.0"]
  attributes:
    postgresql:
      enable_pgdg_apt: true
      version: "9.3"

- name: yum-pgdg-client-ruby
  run_list:
  - recipe[minitest-handler]
  - recipe[postgresql]
  - recipe[postgresql::ruby]
  excludes: ["ubuntu-10.04", "ubuntu-12.04", "ubuntu-14.04", "debian-7.4"]
  attributes:
    postgresql:
      enable_pgdg_yum: true
      version: "9.3"
      client:
        packages: ["postgresql93", "postgresql93-devel"]

- name: apt-pgdg-server-pg_stat_statements
  run_list:
  - recipe[minitest-handler]
  - recipe[postgresql::ruby]
  - recipe[postgresql::contrib]
  excludes: ["centos-5.10", "centos-6.4", "centos-7.0"]
  attributes:
    postgresql:
      enable_pgdg_apt: true
      version: "9.3"
      password:
        postgres: "iloverandompasswordsbutthiswilldo"
      config:
        shared_preload_libraries: "pg_stat_statements"
        ssl_cert_file: "/etc/ssl/certs/ssl-cert-snakeoil.pem"
        ssl_key_file: "/etc/ssl/private/ssl-cert-snakeoil.key"
      contrib:
        extensions:
          - pg_stat_statements

- name: yum-pgdg-server-pg_stat_statements
  run_list:
  - recipe[minitest-handler]
  - recipe[postgresql::ruby]
  - recipe[postgresql::contrib]
  excludes: ["ubuntu-10.04", "ubuntu-12.04", "ubuntu-14.04", "debian-7.4"]
  attributes:
    postgresql:
      enable_pgdg_yum: true
      version: "9.3"
      server:
        packages: ["postgresql93-server"]
        service_name: "postgresql-9.3"
      password:
        postgres: "iloverandompasswordsbutthiswilldo"
      config:
        shared_preload_libraries: "pg_stat_statements"
      contrib:
        extensions:
          - pg_stat_statements
