---
- hosts: all
  gather_facts: no
  tasks:
    - name: Read vars from secrets file
      include_vars: "{{ secrets_file }}"
      tags: always
      always_run: yes

- hosts: all
  gather_facts: yes
  become: true
  roles:
    - common
    - { role: tls, tags: [tls] }
  handlers:
    - include: roles/httpd/handlers/main.yml

- hosts: storage
  gather_facts: yes
  become: true
  roles:
    - { role: mysql, tags: [mysql] }
    - { role: ldap,  tags: [ldap] }

- hosts: php-apps:java-apps
  gather_facts: yes
  become: true
  roles:
    - httpd

- hosts: loadbalancer
  gather_facts: no
  become: true
  roles:
    - { role: haproxy, tags: [lb] }

- hosts: php-apps
  gather_facts: no
  become: true
  vars:
    env_lang: php
  roles:
    - php56fpm
    - static
    - welcome
    - openconext-common
    - engineblock
    - janus
    - profile

- hosts: java-apps
  gather_facts: yes
  become: true
  roles:
    - tomcat
    - metadata-exporter
    - pdp
    - grouper
    - teams
    - mujina-idp
    - mujina-sp
    - authz-server
    #- name: voot
    #  tags: voot
    - authz-playground
    - oidc
    - aa
  handlers:
    - include: roles/httpd/handlers/main.yml

---
- hosts: all
  gather_facts: no
  tasks:
    - name: Read vars from secrets file
      include_vars: "{{ secrets_file }}"
      tags: always
      always_run: yes

- hosts: all
  gather_facts: yes
  become: true
  roles:
    - common
    - { role: tls, tags: [tls] }
  handlers:
    - include: roles/httpd/handlers/main.yml

- hosts: storage
  gather_facts: yes
  become: true
  roles:
    - { role: mysql, tags: [mysql] }
    - { role: ldap,  tags: [ldap] }

- hosts: php-apps:java-apps
  gather_facts: yes
  become: true
  roles:
    - httpd

- hosts: loadbalancer
  gather_facts: no
  become: true
  roles:
    - { role: haproxy, tags: [lb] }

- hosts: php-apps
  gather_facts: no
  become: true
  vars:
    env_lang: php
  roles:
    - php56fpm
    - static
    - welcome
    - openconext-common
    - engineblock
    - janus
    - profile
  handlers: 
    - include: roles/httpd/handlers/main.yml

- hosts: java-apps
  gather_facts: yes
  become: true
  roles:
    - tomcat
    - metadata-exporter
    - pdp
    - grouper
    - teams
    - mujina-idp
    - mujina-sp
    - authz-server
    #- name: voot
    #  tags: voot
    - authz-playground
    - oidc
    - aa
  handlers:
    - include: roles/httpd/handlers/main.yml

Include httpd handler to docker playbook
Include httpd handler to docker playbook
