---
- name: Install yarn
  become: true
  become_method: sudo
  shell: |
    if ! hash yarn > /dev/null 2>&1; then
      curl --silent --show-error https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
      echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
      sudo apt-get update
      sudo apt-get install --assume-yes yarn
    fi
