Skip to content

Commit

Permalink
Also use /etc/apt/keyrings instead
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesmyatt committed May 26, 2024
1 parent 8d9379f commit 63b9909
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ docker_apt_release_channel: stable
# and is only necessary until Docker officially supports them.
docker_apt_ansible_distribution: "{{ 'ubuntu' if ansible_distribution in ['Pop!_OS', 'Linux Mint'] else ansible_distribution }}"
docker_apt_arch: "{{ 'arm64' if ansible_architecture == 'aarch64' else 'amd64' }}"
docker_apt_repository: "deb [arch={{ docker_apt_arch }} signed-by=/etc/apt/trusted.gpg.d/docker.asc] {{ docker_repo_url }}/{{ docker_apt_ansible_distribution | lower }} {{ ansible_distribution_release }} {{ docker_apt_release_channel }}"
docker_apt_repository: "deb [arch={{ docker_apt_arch }} signed-by=/etc/apt/keyrings/docker.asc] {{ docker_repo_url }}/{{ docker_apt_ansible_distribution | lower }} {{ ansible_distribution_release }} {{ docker_apt_release_channel }}"

Check warning on line 42 in defaults/main.yml

View workflow job for this annotation

GitHub Actions / Lint

42:201 [line-length] line too long (232 > 200 characters)
docker_apt_ignore_key_error: true
docker_apt_gpg_key: "{{ docker_repo_url }}/{{ docker_apt_ansible_distribution | lower }}/gpg"
docker_apt_gpg_key_checksum: "sha256:1500c1f56fa9e26b9b8f42452a553675796ade0807cdce11975eb98170b3a570"
Expand Down
8 changes: 7 additions & 1 deletion tasks/setup-Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,16 @@
state: present
when: docker_add_repo | bool

- name: Create apt keyring directory
file:
path: /etc/apt/keyrings
mode: "0755"
state: directory

- name: Add Docker apt key.
ansible.builtin.get_url:
url: "{{ docker_apt_gpg_key }}"
dest: /etc/apt/trusted.gpg.d/docker.asc
dest: /etc/apt/keyrings/docker.asc
mode: '0644'
force: false
checksum: "{{ docker_apt_gpg_key_checksum | default(omit) }}"
Expand Down

0 comments on commit 63b9909

Please sign in to comment.