mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Merge pull request #3521 from holta/yarn-apt-key
Modernize Yarn install w/ signed apt/PPA key (prereq for Internet Archive)
This commit is contained in:
commit
26327ddd05
1 changed files with 30 additions and 19 deletions
|
@ -1,30 +1,41 @@
|
||||||
- name: "Yarn | GPG"
|
- name: Yarn | Download apt key to /usr/share/keyrings/yarn.gpg
|
||||||
apt_key:
|
shell: curl https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor > /usr/share/keyrings/yarn.gpg
|
||||||
url: https://dl.yarnpkg.com/debian/pubkey.gpg
|
|
||||||
state: present
|
|
||||||
|
|
||||||
- name: "Yarn | Ensure Debian sources list file exists"
|
- name: Yarn | Add signed Yarn PPA to /etc/apt/sources.list.d/dl_yarnpkg_com_debian.list
|
||||||
file:
|
apt_repository:
|
||||||
path: /etc/apt/sources.list.d/yarn.list
|
repo: "deb [signed-by=/usr/share/keyrings/yarn.gpg] https://dl.yarnpkg.com/debian/ stable main"
|
||||||
owner: root
|
#filename: yarn # If legacy filename yarn.list is preferred
|
||||||
mode: '0644'
|
|
||||||
state: touch
|
|
||||||
|
|
||||||
- name: "Yarn | Ensure Debian package is in sources list"
|
# 2023-04-01 above avoids DEPRECATED apt-key command & associated problems:
|
||||||
lineinfile:
|
# https://github.com/iiab/iiab/wiki/IIAB-Platforms#etcapttrustedgpg-legacy-keyring-warnings
|
||||||
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"
|
# - 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:
|
apt:
|
||||||
update_cache: yes
|
update_cache: yes
|
||||||
|
|
||||||
- name: "Yarn | Install"
|
- name: Yarn | Install
|
||||||
package:
|
package:
|
||||||
name: yarn
|
name: yarn
|
||||||
state: latest
|
#state: latest # No need to mention it, with apt
|
||||||
|
|
||||||
|
|
||||||
# RECORD Yarn AS INSTALLED
|
# RECORD Yarn AS INSTALLED
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue