Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make use of other keyring #14

Merged
merged 2 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
@@ -1,6 +1,6 @@
# tasks file
---
- name: repository | install dependencies (pre)

Check warning on line 3 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:
name: "{{ yarn_dependencies_pre }}"
state: "{{ apt_install_state | default('latest') }}"
Expand All @@ -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
Loading