1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 11:42:08 +00:00
iiab/roles/yarn/tasks/install.yml

41 lines
958 B
YAML
Raw Normal View History

2020-02-04 23:19:44 +00:00
- name: "Yarn | GPG"
apt_key:
url: https://dl.yarnpkg.com/debian/pubkey.gpg
state: present
- name: "Yarn | Ensure Debian sources list file exists"
file:
path: /etc/apt/sources.list.d/yarn.list
owner: root
mode: '0644'
state: touch
- name: "Yarn | Ensure Debian package is in sources list"
lineinfile:
dest: /etc/apt/sources.list.d/yarn.list
2020-02-05 00:08:30 +00:00
regexp: 'deb https://dl.yarnpkg.com/debian/ stable main'
line: 'deb https://dl.yarnpkg.com/debian/ stable main'
2020-02-04 23:19:44 +00:00
state: present
- name: "Yarn | Update APT cache"
apt:
update_cache: yes
- name: "Yarn | Install"
package:
name: yarn
state: latest
# RECORD Yarn AS INSTALLED
- name: "Set 'yarn_installed: True'"
set_fact:
yarn_installed: True
- name: "Add 'yarn_installed: True' to {{ iiab_state_file }}"
lineinfile:
path: "{{ iiab_state_file }}" # /etc/iiab/iiab_state.yml
regexp: '^yarn_installed'
line: 'yarn_installed: True'