[FIX] docker: use pip for arm, not just Raspbian

This commit is contained in:
Jannik Beyerstedt 2020-04-17 12:15:14 +02:00
parent 4ecd30ba5f
commit 87b23b5b8a

View file

@ -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: