---
- hosts: servers
  become: yes
  roles:
    - base
    - groonga
    - postgresql
    - mariadb
    - redmine
    - httpd

- hosts: log
  become: yes
  roles:
    - base
    - fluentd
    - benchmark

---
- hosts: servers
  become: yes
  roles:
    - base
    - groonga
    - { role: postgresql, when: database_adapter == "postgresql" }
    - { role: mariadb, when: database_adapter == "mysql2" }
    - redmine
    - httpd

- hosts: log
  become: yes
  roles:
    - base
    - fluentd
    - benchmark

Set up database when use it
Set up database when use it
