Skip to content

Commit

Permalink
Merge pull request #10 from Oefenweb/make-use-of-other-keyring
Browse files Browse the repository at this point in the history
Make use of other keyring
  • Loading branch information
tersmitten authored Nov 26, 2024
2 parents 2df5064 + a023f50 commit 75574f4
Show file tree
Hide file tree
Showing 4 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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Set up [Insync](https://www.insynchq.com) in Debian-like systems.

* `software-properties-common` (will be installed)
* `dirmngr` (will be installed)
* `apt-transport-https` (will be installed)

* `apt-utils` (will be installed)
* `procps` (will be installed)

Expand Down
23 changes: 17 additions & 6 deletions tasks/repository.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,37 @@
# tasks file
---
- name: repository | dependencies
- 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.

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.

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: "{{ insync_dependencies_pre }}"
state: "{{ apt_install_state | default('latest') }}"
update_cache: true
cache_valid_time: "{{ apt_update_cache_valid_time | default(3600) }}"
tags:
- insync-repository-dependencies
- insync-repository-install-dependencies

- name: repository | add public key
- name: repository | (keyrings) directory | create
ansible.builtin.file:
path: "{{ insync_keyring_dst | dirname }}"
state: directory
owner: root
group: root
mode: 0755
tags:
- insync-repository-keyrings-directory-create

- name: repository | (keyring) file | download
ansible.builtin.apt_key:
id: A684470CACCAF35C
id: "{{ insync_keyring_id }}"
keyserver: "{{ apt_key_keyserver | default('keyserver.ubuntu.com') }}"
keyring: "{{ insync_keyring_dst }}"
state: present
tags:
- insync-repository-public-key
- insync-repository-keyring-file-download

- name: repository | add

Check warning on line 31 in tasks/repository.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 31 in tasks/repository.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.

Check warning on line 31 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: "{{ insync_repositories }}"
Expand Down
9 changes: 8 additions & 1 deletion vars/main.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
# vars file
---
insync_keyring_id: A684470CACCAF35C
insync_keyring_dst: /usr/share/keyrings/insync.gpg
insync_repositories:
- type: "deb [signed-by={{ insync_keyring_dst }}]"
url: "http://apt.insync.io/{{ ansible_distribution | lower }} {{ ansible_distribution_release }}"
component: 'non-free contrib'
# TODO: Remove in next major release
- type: deb
url: "http://apt.insync.io/{{ ansible_distribution | lower }} {{ ansible_distribution_release }}"
component: 'non-free contrib'
state: absent

insync_dependencies_pre:
- software-properties-common
- dirmngr
- gpg-agent
- apt-transport-https
- apt-utils
- procps

Expand Down

0 comments on commit 75574f4

Please sign in to comment.