Skip to content
Permalink
Browse files

update to Docker v18.06.1-ce / new versioning schema (#5)

* update to Docker v18.06.1-ce

* use systemd module instead of systemctl command

* increase min. Ansible version from 2.2 to 2.4

* make Ansible linter happy / changelog to separate file / new versioning scheme

* update CHANGELOG
  • Loading branch information...
githubixx committed Jan 8, 2019
1 parent de0b4e2 commit 4ecddc38f4adfdf9d84f38d896bc8c0c14563d92
Showing with 62 additions and 43 deletions.
  1. +33 −0 CHANGELOG.md
  2. +1 −18 README.md
  3. +1 −1 defaults/main.yml
  4. +5 −2 handlers/main.yml
  5. +1 −1 meta/main.yml
  6. +21 −21 tasks/main.yml
@@ -0,0 +1,33 @@
Changelog
---------

**4.0.0+18.06.1**

- use correct semantic versioning as described in https://semver.org. Needed for Ansible Galaxy importer as it now insists on using semantic versioning.
- moved changelog entries to separate file
- make Ansible linter happy
- use systemd module instead of systemctl command for handlers
- increase min. Ansible version from 2.2 to 2.4
- no major changes but decided to start a new major release as versioning scheme changed quite heavily

**r3.1.1_v18.06.1-ce**

- Update Docker to `v18.06.1-ce`

**r3.1.0_v17.03.2-ce**

- introduce `docker_ca_certificates_src_dir`, `docker_ca_certificates_dst_dir` and `docker_ca_certificates` variables

**r3.0.0_v17.03.2-ce**

- works with Ubuntu 18.04
- update README

**r2.0.0_v17.03.2-ce**

- major refactoring
- introduce flexible parameter settings for dockerd daemon via `dockerd_settings` and `dockerd_settings_user`

**r1.0.0_v17.03.2-ce**

- initial release
@@ -18,23 +18,6 @@ The default variables of the role variables are configured to work with Kubernet
Changelog
---------

**r3.1.0_v17.03.2-ce**

- introduce `docker_ca_certificates_src_dir`, `docker_ca_certificates_dst_dir` and `docker_ca_certificates` variables

**r3.0.0_v17.03.2-ce**

- works with Ubuntu 18.04
- update README

**r2.0.0_v17.03.2-ce**

- major refactoring
- introduce flexible parameter settings for dockerd daemon via `dockerd_settings` and `dockerd_settings_user`

**r1.0.0_v17.03.2-ce**

- initial release

Role Variables
--------------
@@ -44,7 +27,7 @@ Role Variables
docker_download_dir: "/opt/tmp"
# Docker version to download and use.
docker_version: "17.03.2-ce"
docker_version: "18.06.1-ce"
docker_user: "docker"
docker_group: "docker"
docker_uid: 666
@@ -3,7 +3,7 @@
docker_download_dir: "/opt/tmp"

# Docker version to download and use.
docker_version: "17.03.2-ce"
docker_version: "18.06.1-ce"
docker_user: "docker"
docker_group: "docker"
docker_uid: 666
@@ -1,6 +1,9 @@
---
- name: reload systemd
command: systemctl daemon-reload
systemd:
daemon_reload: yes

- name: restart docker
command: systemctl restart docker
systemd:
name: docker
state: restarted
@@ -2,7 +2,7 @@ galaxy_info:
author: Robert Wimmer
description: Installs Docker incl. systemd integration
license: GPLv3
min_ansible_version: 2.2
min_ansible_version: 2.4
platforms:
- name: Ubuntu
versions:
@@ -1,13 +1,13 @@
---
- name: Copy certificates for Docker registries (if provided)
copy:
src: "{{docker_ca_certificates_src_dir}}/{{item}}"
dest: "{{docker_ca_certificates_dst_dir}}/{{item}}"
src: "{{ docker_ca_certificates_src_dir }}/{{ item }}"
dest: "{{ docker_ca_certificates_dst_dir }}/{{ item }}"
mode: 0644
owner: root
group: root
with_items:
- "{{docker_ca_certificates}}"
- "{{ docker_ca_certificates }}"
when: docker_ca_certificates is defined
tags:
- docker
@@ -22,50 +22,50 @@

- name: Create docker group
group:
name: "{{docker_group}}"
gid: "{{docker_gid}}"
name: "{{ docker_group }}"
gid: "{{ docker_gid }}"
state: present
tags:
- docker

- name: Create docker user
user:
name: "{{docker_user}}"
uid: "{{docker_uid}}"
group: "{{docker_group}}"
name: "{{ docker_user }}"
uid: "{{ docker_uid }}"
group: "{{ docker_group }}"
shell: /usr/sbin/nologin
tags:
- docker

- name: Create download directory (used to store archives)
file:
path: "{{docker_download_dir}}"
path: "{{ docker_download_dir }}"
state: directory
mode: 0750
tags:
- docker

- name: Downloading official Docker binaries archive
get_url:
url: https://download.docker.com/linux/static/stable/x86_64/docker-{{docker_version}}.tgz
dest: "{{docker_download_dir}}/docker-{{docker_version}}.tgz"
url: "https://download.docker.com/linux/static/stable/x86_64/docker-{{ docker_version }}.tgz"
dest: "{{ docker_download_dir }}/docker-{{ docker_version }}.tgz"
mode: 0640
tags:
- docker
- docker

- name: Unzip downloaded Docker archive
unarchive:
src: "{{docker_download_dir}}/docker-{{docker_version}}.tgz"
dest: "{{docker_download_dir}}"
src: "{{ docker_download_dir }}/docker-{{ docker_version }}.tgz"
dest: "{{ docker_download_dir }}"
remote_src: yes
creates: "{{docker_download_dir}}/docker/docker"
creates: "{{ docker_download_dir }}/docker/docker"
tags:
- docker
- docker

- name: Copy Docker binaries to destination directory
copy:
src: "{{docker_download_dir}}/docker/{{item}}"
dest: "{{docker_bin_dir}}/{{item}}"
src: "{{ docker_download_dir }}/docker/{{ item }}"
dest: "{{ docker_bin_dir }}/{{ item }}"
mode: 0755
owner: root
group: root
@@ -83,7 +83,7 @@

- name: Combine dockerd_settings and dockerd_settings_user (if defined)
set_fact:
dockerd_settings: "{{dockerd_settings | combine(dockerd_settings_user|default({})) }}"
dockerd_settings: "{{ dockerd_settings | combine(dockerd_settings_user|default({})) }}"
tags:
- docker

@@ -98,7 +98,7 @@
- reload systemd
- restart docker
tags:
- docker
- docker

- name: Create docker.service systemd file
template:
@@ -111,7 +111,7 @@
- reload systemd
- restart docker
tags:
- docker
- docker

- meta: flush_handlers

0 comments on commit 4ecddc3

Please sign in to comment.
You can’t perform that action at this time.