This is a simple role that will install Yarn on Debian/Ubuntu from the official APT repo.
Add this to your requirements.yml:
- src: https://github.com/angristan/ansible-yarn---
- hosts: myhost
roles:
- name: yarn
tags: yarn