ansible-roles/nodejs/tasks/yarn.yml
Jérémy Lecour 29ec7bdcf2
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
Remove embedded GPG keys only if legacy keyring is present
2021-07-04 22:08:47 +02:00

58 lines
961 B
YAML

---
- name: Look for legacy apt keyring
stat:
path: /etc/apt/trusted.gpg
register: _trusted_gpg_keyring
tags:
- system
- packages
- nodejs
- yarn
- name: Yarn embedded GPG key is absent
apt_key:
id: "86E50310"
keyring: /etc/apt/trusted.gpg
state: absent
when: _trusted_gpg_keyring.stat.exists
tags:
- system
- packages
- nodejs
- yarn
- name: Yarn GPG key is installed
copy:
src: yarn.asc
dest: /etc/apt/trusted.gpg.d/yarn.asc
mode: "0644"
owner: root
group: root
tags:
- system
- packages
- nodejs
- yarn
- name: Yarn sources list is available
apt_repository:
repo: "deb https://dl.yarnpkg.com/debian/ stable main"
filename: yarn
update_cache: yes
state: present
tags:
- system
- packages
- nodejs
- yarn
- name: Yarn is installed
apt:
name: yarn
state: present
tags:
- packages
- nodejs
- yarn