[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
1 changed files with 5 additions and 8 deletions

View File

@ -7,9 +7,6 @@
- name: docker - Detect architecture - name: docker - Detect architecture
shell: dpkg --print-architecture shell: dpkg --print-architecture
register: dpkg_arch register: dpkg_arch
- name: docker - Detect debian distributor ID
shell: lsb_release -is
register: lsb_id
# Install docker CE # Install docker CE
- name: docker - Install docker CE APT dependencies - name: docker - Install docker CE APT dependencies
@ -36,13 +33,13 @@
apt_repository: apt_repository:
repo: "deb [arch={{ dpkg_arch.stdout }}] https://download.docker.com/linux/debian {{ ansible_distribution_release }} stable" repo: "deb [arch={{ dpkg_arch.stdout }}] https://download.docker.com/linux/debian {{ ansible_distribution_release }} stable"
state: present state: present
when: lsb_id.stdout != "Raspbian" when: ansible_lsb.id != "Raspbian"
- name: docker - Add docker CE repo (Rasbian) - name: docker - Add docker CE repo (Rasbian)
become: yes become: yes
apt_repository: apt_repository:
repo: "deb [arch={{ dpkg_arch.stdout }}] https://download.docker.com/linux/raspbian {{ ansible_distribution_release }} stable" repo: "deb [arch={{ dpkg_arch.stdout }}] https://download.docker.com/linux/raspbian {{ ansible_distribution_release }} stable"
state: present state: present
when: lsb_id.stdout == "Raspbian" when: ansible_lsb.id == "Raspbian"
- name: docker - Install docker CE - name: docker - Install docker CE
become: yes become: yes
@ -50,15 +47,15 @@
name: docker-ce name: docker-ce
state: latest state: latest
update_cache: yes update_cache: yes
cache_valid_time: 3600 cache_valid_time: "3600"
# Install latest release of docker-compose (using pip3) # Install latest release of docker-compose (using pip3)
# docker only provides pre-compiled binaries for x86_64, but not for armhf/ arm64! # docker only provides pre-compiled binaries for x86_64, but not for armhf/ arm64!
# but ansible needs the python package anyway # 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: set_fact:
dockercompose_use_pip: true dockercompose_use_pip: true
when: lsb_id.stdout == "Raspbian" when: ansible_architecture == "aarch64" or ansible_architecture == "armv7f"
- name: docker-compose - Install x86_46 binary - name: docker-compose - Install x86_46 binary
block: block: