---
# Load distro specific variables
- include_vars: "{{ ansible_distribution }}.yml"
  tags: always
- include_vars: "{{ ansible_fqdn }}.yml"
  ignore_errors: True


- block:
  - include_tasks: system_setup/base_packages.yml
  - include_tasks: system_setup/prepare_packagemanager.yml
  - include_role: name=database
  - include_tasks: system_setup/prepare_database.yml
  - include_tasks: system_setup/packages.yml
  - include_role: name=webserver
  - include_tasks: system_setup/nginx.yml
  - include_tasks: system_setup/user.yml
  - include_tasks: system_setup/ruby.yml
  - include_tasks: system_setup/mastodon.yml
  - include_tasks: system_setup/letsencrypt.yml
  rescue:
    - set_fact: task_failed=true