Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docker_version variable support #1477

Merged
6 commits merged into from
Jul 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ docker_logging:
max_file_size: 10m # The maximum size of the log before it is rolled. A positive integer plus a modifier representing the unit of measure (k, m, or g)
max_files: 2 # The maximum number of log files that can be present

docker_version: 18.09.6
docker_version:
Debian: "5:18.09.*"
RedHat: "18.09.*"
Original file line number Diff line number Diff line change
@@ -1,25 +1,18 @@
---
# Docker (used by master & worker as dependency)

- name: Install Docker for Debian family
- name: Install Docker packages
package:
name: "{{ item }}"
name: "{{ packages[ansible_os_family] }}"
state: present
loop:
- apt-transport-https
- ca-certificates
- containerd.io
- docker-ce-cli=5:18.09.*
- docker-ce=5:18.09.*
when: ansible_os_family == "Debian"

- name: Install Docker for RedHat family
package:
name: "{{ item }}"
state: present
loop:
- docker-ce-cli-18.09.*
- docker-ce-18.09.*
when: ansible_os_family == "RedHat"
vars:
packages:
RedHat:
- docker-ce-cli-{{ docker_version.RedHat }}
- docker-ce-{{ docker_version.RedHat }}
Debian:
- containerd.io
- docker-ce-cli={{ docker_version.Debian }}
- docker-ce={{ docker_version.Debian }}

- include_tasks: configure-docker.yml