From e4a6edb4ef3c1295d87cdfc737a5f07d26c3547b Mon Sep 17 00:00:00 2001 From: Alexander Thomas Date: Fri, 19 Jan 2018 16:16:31 +0100 Subject: [PATCH 1/2] Introduced CPU architecture switch for apt source definition --- README.md | 3 ++- defaults/main.yml | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c7e81da..454be56 100644 --- a/README.md +++ b/README.md @@ -25,8 +25,9 @@ The `docker_edition` should be either `ce` (Community Edition) or `ee` (Enterpri Docker Compose installation options. + docker_apt_arch: amd64 docker_apt_release_channel: stable - docker_apt_repository: "deb https://download.docker.com/linux/{{ ansible_distribution|lower }} {{ ansible_distribution_release }} {{ docker_apt_release_channel }}" + docker_apt_repository: "deb [arch={{ docker_apt_arch }}] https://download.docker.com/linux/{{ ansible_distribution|lower }} {{ ansible_distribution_release }} {{ docker_apt_release_channel }}" (Used only for Debian/Ubuntu.) You can switch the channel to `edge` if you want to use the Edge release. diff --git a/defaults/main.yml b/defaults/main.yml index 3573df1..1cb4d22 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -11,7 +11,9 @@ docker_compose_path: /usr/local/bin/docker-compose # Used only for Debian/Ubuntu. Switch 'stable' to 'edge' if needed. docker_apt_release_channel: stable -docker_apt_repository: "deb https://download.docker.com/linux/{{ ansible_distribution|lower }} {{ ansible_distribution_release }} {{ docker_apt_release_channel }}" +# Architecture must be specified in order for updates to work. Choose between 'amd64' & 'i386'. +docker_apt_arch: amd64 +docker_apt_repository: "deb [arch={{ docker_apt_arch }}] https://download.docker.com/linux/{{ ansible_distribution|lower }} {{ ansible_distribution_release }} {{ docker_apt_release_channel }}" # Used only for RedHat/CentOS. docker_yum_repo_url: https://download.docker.com/linux/centos/docker-{{ docker_edition }}.repo From 462a0b5359f7001fe11c4cb34fca17576392b5f6 Mon Sep 17 00:00:00 2001 From: Alexander Thomas Date: Fri, 19 Jan 2018 16:21:24 +0100 Subject: [PATCH 2/2] Changed 'include' to 'include_tasks' due to deprecations in Ansible >2.4 --- tasks/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index ba197cf..d0bc72e 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -1,8 +1,8 @@ --- -- include: setup-RedHat.yml +- include_tasks: setup-RedHat.yml when: ansible_os_family == 'RedHat' -- include: setup-Debian.yml +- include_tasks: setup-Debian.yml when: ansible_os_family == 'Debian' - name: Install Docker. @@ -14,5 +14,5 @@ state: started enabled: yes -- include: docker-compose.yml +- include_tasks: docker-compose.yml when: docker_install_compose