<commit_before>---
- name: Ensure apt-transport-https is installed.
  apt: name=apt-transport-https state=present

- name: Add Nodesource apt key.
  apt_key:
    url: https://keyserver.ubuntu.com/pks/lookup?op=get&fingerprint=on&search=0x1655A0AB68576280
    id: "68576280"
    state: present

- name: Add NodeSource repositories for Node.js.
  apt_repository:
    repo: "{{ item }}"
    state: present
  with_items:
    - "deb https://deb.nodesource.com/node_{{ nodejs_version }} {{ ansible_distribution_release }} main"
    - "deb-src https://deb.nodesource.com/node_{{ nodejs_version }} {{ ansible_distribution_release }} main"
  register: node_repo

- name: Update apt cache if repo was added.
  apt: update_cache=yes
  when: node_repo.changed

- name: Ensure Node.js and npm are installed.
  apt: "name=nodejs={{ nodejs_version|regex_replace('x', '') }}* state=present"<commit_msg>installing yarn on nodejs role<commit_after>---
- name: Ensure apt-transport-https is installed.
  apt: name=apt-transport-https state=present

- name: Add Nodesource apt key.
  apt_key:
    url: https://keyserver.ubuntu.com/pks/lookup?op=get&fingerprint=on&search=0x1655A0AB68576280
    id: "68576280"
    state: present

- name: Add NodeSource repositories for Node.js.
  apt_repository:
    repo: "{{ item }}"
    state: present
  with_items:
    - "deb https://deb.nodesource.com/node_{{ nodejs_version }} {{ ansible_distribution_release }} main"
    - "deb-src https://deb.nodesource.com/node_{{ nodejs_version }} {{ ansible_distribution_release }} main"
  register: node_repo

- name: Update apt cache if repo was added.
  apt: update_cache=yes
  when: node_repo.changed

- name: Ensure Node.js and npm are installed.
  apt: "name=nodejs={{ nodejs_version|regex_replace('x', '') }}* state=present"

- name: Add yarn apt key.
  apt_key:
    url: https://dl.yarnpkg.com/debian/pubkey.gpg
    state: present

- name: Add repositories for yarn
  apt_repository:
    repo: "{{ item }}"
    state: present
  with_items:
    - "deb https://dl.yarnpkg.com/debian/ stable main"
  register: yarn_repo

- name: Update apt cache if repo was added.
  apt: update_cache=yes
  when: yarn_repo.changed

- name: Ensure yarn is installed.
  apt:
    name: yarn
    state: present
{'fraction_non_alphanumeric': 0.12694185530403906, 'fraction_numerical': 0.019529516200621395, 'mean_word_length': 3.7855626326963905, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5753876', 'n_tokens_mistral': 812, 'n_tokens_neox': 754, 'n_words': 188}