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

Fixed apt keyring isses #6

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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: 0 additions & 1 deletion tasks/install.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# tasks file
---
- name: ensure update-notifier directory

Check warning on line 3 in tasks/install.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.
ansible.builtin.file:
path: /var/lib/update-notifier/user.d
state: directory
Expand All @@ -10,8 +10,7 @@
- ansible_distribution_major_version is version('20', '>=')
tags:
- insync-install-dependencies

- name: install | dependencies

Check warning on line 13 in tasks/install.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 }}"
state: "{{ apt_install_state | default('latest') }}"
Expand Down
14 changes: 14 additions & 0 deletions tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,27 @@
# tasks file
---
- name: "Loading Debian variables"
ansible.builtin.include_vars:
file: 'Debian.yml'
when: ansible_distribution == "Debian"
- name: "Loading Ubuntu variables"
ansible.builtin.include_vars:
file: 'Ubuntu.yml'
when: ansible_distribution == "Ubuntu"
- name: "Loading Linux Mint variables"
ansible.builtin.include_vars:
file: "LinuxMint.yml"
when: ansible_distribution == "Linux Mint"


- name: repository

Check warning on line 17 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.
ansible.builtin.import_tasks: repository.yml
tags:
- configuration
- insync
- insync-repository

- name: install

Check warning on line 24 in tasks/main.yml

View workflow job for this annotation

GitHub Actions / Lint

name[casing]

All names should start with an uppercase letter.
ansible.builtin.import_tasks: install.yml
tags:
- configuration
Expand Down
8 changes: 7 additions & 1 deletion tasks/repository.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# tasks file
---
- name: "Creating keyring directory"
ansible.builtin.file:
path: "{{ apt_key_dir }}"
state: "directory"
mode: '755'
- name: repository | dependencies

Check warning on line 8 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') }}"
Expand All @@ -9,17 +14,18 @@
tags:
- insync-repository-dependencies

- name: repository | add public key

Check warning on line 17 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_key:
id: A684470CACCAF35C

Check failure on line 19 in tasks/repository.yml

View workflow job for this annotation

GitHub Actions / Lint

jinja[spacing]

Jinja2 spacing could be improved: {{ apt_key_dir}}/insync.gpg -> {{ apt_key_dir }}/insync.gpg
keyserver: "{{ apt_key_keyserver | default('keyserver.ubuntu.com') }}"
keyring: "{{ apt_key_dir}}/insync.gpg"
state: present
tags:
- insync-repository-public-key

- name: repository | add

Check warning on line 26 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 }}"
repo: "{{ item.type }} [signed-by={{ apt_key_dir }}/insync.gpg] {{ item.url }} {{ item.component }}"
state: present
update_cache: true
mode: 0644
Expand Down
5 changes: 5 additions & 0 deletions vars/Debian.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
insync_repositories:
- type: deb
url: "http://apt.insync.io/debian {{ ansible_distribution_release }}"
component: 'non-free contrib'
5 changes: 5 additions & 0 deletions vars/LinuxMint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
insync_repositories:
- type: deb
url: "http://apt.insync.io/mint {{ ansible_distribution_release }}"
component: 'non-free contrib'
5 changes: 5 additions & 0 deletions vars/Ubuntu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
insync_repositories:
- type: deb
url: "http://apt.insync.io/ubuntu {{ ansible_distribution_release }}"
component: 'non-free contrib'
6 changes: 1 addition & 5 deletions vars/main.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# vars file
---
insync_repositories:
- type: deb
url: "http://apt.insync.io/{{ ansible_distribution | lower }} {{ ansible_distribution_release }}"
component: 'non-free contrib'

insync_dependencies_pre:
- software-properties-common
- dirmngr
Expand All @@ -13,3 +8,4 @@ insync_dependencies_pre:

insync_dependencies:
- insync
apt_key_dir: '/etc/apt/keyrings'
Loading