mirror of
https://github.com/geerlingguy/ansible-role-docker.git
synced 2024-12-21 19:07:06 +01:00
434 update apt key destination
This commit is contained in:
parent
6cb849c416
commit
08ae86e0b5
@ -38,7 +38,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/keyrings/docker.gpg] {{ 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 }}"
|
||||
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"
|
||||
|
@ -33,13 +33,16 @@
|
||||
state: directory
|
||||
mode: '0755'
|
||||
|
||||
- name: Ensure curl is present
|
||||
package: name=curl state=present
|
||||
|
||||
- name: Add Docker apt key
|
||||
shell: >
|
||||
curl -fsSL {{ docker_apt_gpg_key }} | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg --yes
|
||||
changed_when: false
|
||||
- name: Add Docker apt key.
|
||||
ansible.builtin.get_url:
|
||||
url: "{{ docker_apt_gpg_key }}"
|
||||
dest: /etc/apt/keyrings/docker.asc
|
||||
mode: '0644'
|
||||
force: false
|
||||
checksum: "{{ docker_apt_gpg_key_checksum | default(omit) }}"
|
||||
register: add_repository_key
|
||||
ignore_errors: "{{ docker_apt_ignore_key_error }}"
|
||||
when: docker_add_repo | bool
|
||||
|
||||
- name: Change permissions for /etc/apt/keyrings/docker.gpg
|
||||
file:
|
||||
|
Loading…
Reference in New Issue
Block a user