From 87b23b5b8af14499f772bce8fb80f60f8136ff22 Mon Sep 17 00:00:00 2001 From: Jannik Beyerstedt Date: Fri, 17 Apr 2020 12:15:14 +0200 Subject: [PATCH] [FIX] docker: use pip for arm, not just Raspbian --- tasks/docker-Debian.yml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/tasks/docker-Debian.yml b/tasks/docker-Debian.yml index d7c0b50..572b6db 100644 --- a/tasks/docker-Debian.yml +++ b/tasks/docker-Debian.yml @@ -7,9 +7,6 @@ - name: docker - Detect architecture shell: dpkg --print-architecture register: dpkg_arch -- name: docker - Detect debian distributor ID - shell: lsb_release -is - register: lsb_id # Install docker CE - name: docker - Install docker CE APT dependencies @@ -36,13 +33,13 @@ apt_repository: repo: "deb [arch={{ dpkg_arch.stdout }}] https://download.docker.com/linux/debian {{ ansible_distribution_release }} stable" state: present - when: lsb_id.stdout != "Raspbian" + when: ansible_lsb.id != "Raspbian" - name: docker - Add docker CE repo (Rasbian) become: yes apt_repository: repo: "deb [arch={{ dpkg_arch.stdout }}] https://download.docker.com/linux/raspbian {{ ansible_distribution_release }} stable" state: present - when: lsb_id.stdout == "Raspbian" + when: ansible_lsb.id == "Raspbian" - name: docker - Install docker CE become: yes @@ -50,15 +47,15 @@ name: docker-ce state: latest update_cache: yes - cache_valid_time: 3600 + cache_valid_time: "3600" # Install latest release of docker-compose (using pip3) # docker only provides pre-compiled binaries for x86_64, but not for armhf/ arm64! # but ansible needs the python package anyway -- name: docker-compose - Discover if raspbian is used +- name: docker-compose - Discover if ARM is used set_fact: dockercompose_use_pip: true - when: lsb_id.stdout == "Raspbian" + when: ansible_architecture == "aarch64" or ansible_architecture == "armv7f" - name: docker-compose - Install x86_46 binary block: