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 #10

Merged
merged 4 commits into from
Nov 26, 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
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.
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.
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
Loading