Merge pull request #477 from dbrennand/fix/#470

Fix Issue #470
This commit is contained in:
Jeff Geerling 2024-11-23 11:32:59 -06:00 committed by GitHub
commit a60f86efb1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,6 +4,11 @@
path: /etc/apt/trusted.gpg.d/docker.asc path: /etc/apt/trusted.gpg.d/docker.asc
state: absent state: absent
- name: Ensure old apt source list is not present in /etc/apt/sources.list.d
ansible.builtin.file:
path: /etc/apt/sources.list.d/download_docker_com_linux_ubuntu.list
state: absent
- name: Ensure the repo referencing the previous trusted.gpg.d key is not present - name: Ensure the repo referencing the previous trusted.gpg.d key is not present
apt_repository: apt_repository:
repo: "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 }}" repo: "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 }}"
@ -30,13 +35,13 @@
file: file:
path: /etc/apt/keyrings path: /etc/apt/keyrings
state: directory state: directory
mode: '0755' mode: "0755"
- name: Add Docker apt key. - name: Add Docker apt key.
ansible.builtin.get_url: ansible.builtin.get_url:
url: "{{ docker_apt_gpg_key }}" url: "{{ docker_apt_gpg_key }}"
dest: /etc/apt/keyrings/docker.asc dest: /etc/apt/keyrings/docker.asc
mode: '0644' mode: "0644"
force: false force: false
checksum: "{{ docker_apt_gpg_key_checksum | default(omit) }}" checksum: "{{ docker_apt_gpg_key_checksum | default(omit) }}"
register: add_repository_key register: add_repository_key