---

- name: mastodon | Install packages
  package:
    name: "{{ item.package }}"
    update_cache: yes
    cache_valid_time: 3600
    state: latest
    install_recommends: no
  with_items: "{{ packages2 }}"

- name: mastodon | nodejs alternative
  alternatives:
    name: node
    path: /usr/bin/node
    link: /usr/bin/nodejs

- name: mastodon | config yarn
  command:
    cmd: "{{ item }}"
  loop:
    - "corepack enable"
    - "yarn set version stable"