---
- name: Upgrade apt cache
  import_playbook: "helpers/apt_cache_update.yaml"

- name: Setup basic packages
  import_playbook: "helpers/install_basic_packages.yaml"

- name: Setup tools for physical hosts
  import_playbook: "helpers/install_tools_for_bare_metal.yaml"
  when: "'virtual' not in group_names and 'raspberrypi' not in group_names"

- name: Setup Nginx
  import_playbook: "helpers/nginx_base_setup.yaml"
  when: "'www' in group_names"

- name: Setup Apache
  import_playbook: "helpers/apache_base_setup.yaml"
  when: "'www_apache' in group_names"

- name: Setup MariaDB
  import_playbook: "helpers/mariadb_base_setup.yaml"
  when: "'database' in group_names"

- name: Setup VM tools
  import_playbook: "helpers/install_vm_basic_tools.yaml"
  when: "'virtual' in group_names"

- name: Setup containers tools
  import_playbook: "helpers/install_containers_tools.yaml"
  when: "'containers' in group_names"