Skip to content

Commit

Permalink
Make use of other keyring (#14)
Browse files Browse the repository at this point in the history
* Make use of other keyring

* Fix repo configuration
  • Loading branch information
tersmitten authored Nov 27, 2024
1 parent 3588646 commit f7981b4
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ jobs:
matrix:
include:
- distro: debian10
ansible-version: '>=9, <10'
- distro: debian11
- distro: debian12
- distro: ubuntu1804
Expand Down
25 changes: 18 additions & 7 deletions tasks/repository.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,30 @@
tags:
- yarn-repository-install-dependencies

- name: repository | add public key
ansible.builtin.apt_key:
id: 1646B01B86E50310
url: https://dl.yarnpkg.com/debian/pubkey.gpg
state: present
- name: repository | (keyrings) directory | create
ansible.builtin.file:
path: "{{ yarn_keyring_dst | dirname }}"
state: directory
owner: root
group: root
mode: 0755
tags:
- yarn-repository-public-key
- yarn-repository-keyrings-directory-create

- name: repository | (keyring) file | download # noqa command-instead-of-module risky-shell-pipe
ansible.builtin.shell: >
wget -O- {{ yarn_keyring_src }} | gpg --dearmor | tee {{ yarn_keyring_dst }} > /dev/null
args:
creates: "{{ yarn_keyring_dst }}"
tags:
- yarn-repository-keyring-file-download

- name: repository | add

Check warning on line 30 in tasks/repository.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.
ansible.builtin.apt_repository:
repo: "{{ item.type }} {{ item.url }} {{ item.component }}"
state: present
state: "{{ item.state | default('present') }}"
update_cache: true
mode: 0644
with_items: "{{ yarn_repositories }}"
tags:
- yarn-repository-add
9 changes: 9 additions & 0 deletions vars/main.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
# vars file
---
yarn_keyring_src: https://dl.yarnpkg.com/debian/pubkey.gpg
yarn_keyring_dst: /usr/share/keyrings/yarn.gpg
yarn_repositories:
- type: "deb [signed-by={{ yarn_keyring_dst }}]"
url: 'https://dl.yarnpkg.com/debian/ stable'
component: main
- type: deb
url: 'https://dl.yarnpkg.com/debian/ stable'
component: main
state: absent

yarn_dependencies_pre:
- software-properties-common
- dirmngr
- apt-transport-https
- wget
- coreutils

yarn_dependencies:
- yarn

0 comments on commit f7981b4

Please sign in to comment.