fix: add apt source debug tasks, fix arch mapping for Docker repo
ansible_facts['architecture'] returns x86_64 but Docker APT repo expects amd64. Added docker_apt_arch mapping. Also added debug tasks to show apt sources and apt-cache search results for docker-ce. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
parent
36207be565
commit
8af88efeb5
@@ -31,7 +31,8 @@ gitea_runner_file: ".runner"
|
||||
|
||||
# Docker installation (for rootless dependencies)
|
||||
docker_gpg_key_path: "/etc/apt/keyrings/docker.gpg"
|
||||
docker_apt_arch: "{{ 'amd64' if ansible_facts['architecture'] == 'x86_64' else ansible_facts['architecture'] }}"
|
||||
docker_apt_repo: >-
|
||||
deb [arch={{ ansible_facts['architecture'] }} signed-by={{ docker_gpg_key_path }}]
|
||||
deb [arch={{ docker_apt_arch }} signed-by={{ docker_gpg_key_path }}]
|
||||
https://download.docker.com/linux/{{ ansible_facts['distribution'] | lower }}
|
||||
{{ ansible_facts['distribution_release'] }} stable
|
||||
|
||||
@@ -27,6 +27,30 @@
|
||||
cache_valid_time: 0
|
||||
when: ansible_facts['os_family'] == 'Debian'
|
||||
|
||||
- name: Debug apt sources (Debian/Ubuntu)
|
||||
ansible.builtin.shell: |
|
||||
set -o pipefail
|
||||
cat /etc/apt/sources.list.d/*.list /etc/apt/sources.list 2>/dev/null | grep -i docker || true
|
||||
register: apt_docker_sources
|
||||
changed_when: false
|
||||
when: ansible_facts['os_family'] == 'Debian'
|
||||
|
||||
- name: Show apt docker sources
|
||||
ansible.builtin.debug:
|
||||
var: apt_docker_sources.stdout_lines
|
||||
when: ansible_facts['os_family'] == 'Debian'
|
||||
|
||||
- name: Debug apt-cache search docker-ce
|
||||
ansible.builtin.shell: apt-cache search docker-ce 2>/dev/null || true
|
||||
register: apt_search_result
|
||||
changed_when: false
|
||||
when: ansible_facts['os_family'] == 'Debian'
|
||||
|
||||
- name: Show apt-cache search result
|
||||
ansible.builtin.debug:
|
||||
var: apt_search_result.stdout_lines
|
||||
when: ansible_facts['os_family'] == 'Debian'
|
||||
|
||||
- name: Install rootless Docker dependencies (Debian/Ubuntu)
|
||||
ansible.builtin.apt:
|
||||
name:
|
||||
|
||||
Reference in New Issue
Block a user