-
Notifications
You must be signed in to change notification settings - Fork 76
/
install.yml
51 lines (40 loc) · 1.6 KB
/
install.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
- name: Yarn | Download apt key to /usr/share/keyrings/yarn.gpg
shell: curl https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor > /usr/share/keyrings/yarn.gpg
- name: Yarn | Add signed Yarn PPA to /etc/apt/sources.list.d/dl_yarnpkg_com_debian.list
apt_repository:
repo: "deb [signed-by=/usr/share/keyrings/yarn.gpg] https://dl.yarnpkg.com/debian/ stable main"
#filename: yarn # If legacy filename yarn.list is preferred
# 2023-04-01 above avoids DEPRECATED apt-key command & associated problems:
# https://github.com/iiab/iiab/wiki/IIAB-Platforms#etcapttrustedgpg-legacy-keyring-warnings
# - 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
# regexp: 'deb https://dl.yarnpkg.com/debian/ stable main'
# line: 'deb https://dl.yarnpkg.com/debian/ stable main'
# state: present
- name: Yarn | Update APT cache
apt:
update_cache: yes
- name: Yarn | Install
package:
name: yarn
#state: latest # No need to mention it, with apt
# 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'