Skip to content

Commit

Permalink
11.0.0+25.0.0 (#23)
Browse files Browse the repository at this point in the history
* update Docker to v25.0.0

* update README

* remove Debian 10 and Ubuntu 18 support / add Debian 12 support / update Molecule tests

* update CHANGELOG

* update Github Actions workflow
  • Loading branch information
githubixx committed Jan 23, 2024
1 parent df35169 commit a9f6aaa
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 58 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,4 @@ jobs:

- name: Trigger a new import on Galaxy.
run: >-
ansible-galaxy role import --api-key ${{ secrets.GALAXY_API_KEY }}
$(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2)
ansible-galaxy role import --token ${{ secrets.GALAXY_API_KEY }} -vvvvvvvv --role-name=$(echo ${{ github.repository }} | cut -d/ -f2 | sed 's/ansible-role-//' | sed 's/-/_/g') $(echo ${{ github.repository }} | cut -d/ -f1) $(echo ${{ github.repository }} | cut -d/ -f2)
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 11.0.0+25.0.0

- **BREAKING**: remove `Debian 10` and `Ubuntu 18` support
- add `Debian 12` support
- update Docker to `v25.0.0`
- update Molecule tests
- update Github actions workflow

## 10.0.0+23.0.4

- update Docker to `v23.0.4`
Expand Down
43 changes: 14 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,23 @@
ansible-role-docker
===================
# ansible-role-docker

Installs Docker from official Docker binaries archive (no PPA or apt repository). For managing Docker daemon systemd is used. Should work with basically every Linux OS using `systemd`.

Versions
--------
## Versions

I tag every release and try to stay with [semantic versioning](http://semver.org). If you want to use the role I recommend to checkout the latest tag. The master branch is basically development while the tags mark stable releases. But in general I try to keep master in good shape too. A tag `10.0.0+23.0.4` means this is release `10.0.0` of this role and it's meant to be used with Docker version `23.0.4`. If the role itself changes `X.Y.Z` before `+` will increase. If the Docker version changes `XX.YY.ZZ` after `+` will increase. This allows to tag bugfixes and new major versions of the role while it's still developed for a specific Docker release.
I tag every release and try to stay with [semantic versioning](http://semver.org). If you want to use the role I recommend to checkout the latest tag. The master branch is basically development while the tags mark stable releases. But in general I try to keep master in good shape too. A tag `11.0.0+25.0.0` means this is release `11.0.0` of this role and it's meant to be used with Docker version `25.0.0`. If the role itself changes `X.Y.Z` before `+` will increase. If the Docker version changes `XX.YY.ZZ` after `+` will increase. This allows to tag bugfixes and new major versions of the role while it's still developed for a specific Docker release.

Requirements
------------

A recent kernel should be used (something like >= 4.4.x). It makes sense to use a recent kernel for Docker in general. I recommend to use >= 4.8.x if possible. Ubuntu 18.04 and up have already a descent kernel by default. Verify that you have `overlay2` filesystem available if you want to use it instead of e.g. `aufs` which is recommended in production (should be the case for kernel >= 4.4.x). Meanwhile `aufs` is deprecated anyways. But you can change the storage driver in the `dockerd_settings_user` (see below for more information) if you like.

Changelog
---------
## Changelog

see [Changelog](https://github.com/githubixx/ansible-role-docker/blob/master/CHANGELOG.md)

Role Variables
--------------
## Role Variables

```yaml
---
# Directory to store downloaded Docker archive and unarchived binary files.
docker_download_dir: "/opt/tmp"

# Docker version to download and use.
docker_version: "23.0.4"
docker_version: "25.0.0"
docker_user: "docker"
docker_group: "docker"
docker_uid: 666
Expand All @@ -41,9 +31,9 @@ docker_bin_dir: "/usr/local/bin"
# depends on "iptables" command. In case of Archlinux "nftables" also
# includes "iptables" so both work.
#
# Ubuntu 18.04, 20.04 and Debian 10 only provides "iptables".
# Ubuntu 20.04 and Debian 10 only provides "iptables".
#
# Ubuntu 22.04 and Debian 11 allows to install "iptables" and "nftables"
# Ubuntu 22.04, Debian 11 and 12 allows to install "iptables" and "nftables"
# in parallel.
#
# So for Archlinux if either "iptables" or "iptables-nft" package is
Expand Down Expand Up @@ -90,7 +80,7 @@ docker_ca_certificates_dst_dir: "/usr/local/share/ca-certificates"
```

Variables with no defaults:

```yaml
# If you've a Docker registry with a self signed certificate you can copy the
# certificate authority (CA) file to the remote host to the CA certificate store.
Expand Down Expand Up @@ -118,22 +108,19 @@ dockerd_settings_user:

Of course you can add more settings.

Upgrading Docker
---------------
## Upgrading Docker

If you want upgrade Docker update `docker_version` variable accordingly. Afterwards if you run `ansible-playbook` and supply the argument `--extra-vars="upgrade_docker=true"` the playbook will download the specified Docker version and installs the binaries. This will cause systemd to restart `docker.service`. To avoid restarting all Docker daemons on all of your hosts at once consider using `--limit` parameter or reduce parallel Ansible tasks with `--forks`.

Example Playbook
----------------
## Example Playbook

```yaml
- hosts: docker_hosts
roles:
- githubixx.docker
```

Testing
-------
## Testing

This role has a small test setup that is created using [Molecule](https://github.com/ansible-community/molecule), libvirt (vagrant-libvirt) and QEMU/KVM. Please see my blog post [Testing Ansible roles with Molecule, libvirt (vagrant-libvirt) and QEMU/KVM](https://www.tauceti.blog/posts/testing-ansible-roles-with-molecule-libvirt-vagrant-qemu-kvm/) how to setup. The test configuration is [here](https://github.com/githubixx/ansible-role-docker/tree/master/molecule/default).

Expand All @@ -157,12 +144,10 @@ To clean up run
molecule destroy
```

License
-------
## License

GNU GENERAL PUBLIC LICENSE Version 3

Author Information
------------------
## Author Information

[http://www.tauceti.blog](http://www.tauceti.blog)
2 changes: 1 addition & 1 deletion defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
docker_download_dir: "/opt/tmp"

# Docker version to download and use.
docker_version: "23.0.4"
docker_version: "25.0.0"
docker_user: "docker"
docker_group: "docker"
docker_uid: 666
Expand Down
3 changes: 1 addition & 2 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@ galaxy_info:
- name: ArchLinux
- name: Ubuntu
versions:
- "focal"
- "bionic"
- "jammy"
- name: Debian
versions:
- "buster"
- "bullseye"
- "bookworm"
galaxy_tags:
- docker
- container
Expand Down
33 changes: 12 additions & 21 deletions molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,58 +14,49 @@ driver:
platforms:
- name: test-docker-ubuntu2204
box: generic/ubuntu2204
memory: 1024
memory: 1536
cpus: 2
interfaces:
- auto_config: true
network_name: private_network
type: static
ip: 192.168.10.10
ip: 172.16.10.10
- name: test-docker-ubuntu2004
box: generic/ubuntu2004
memory: 512
memory: 1536
cpus: 2
interfaces:
- auto_config: true
network_name: private_network
type: static
ip: 192.168.10.20
- name: test-docker-ubuntu1804
box: generic/ubuntu1804
memory: 512
ip: 172.16.10.20
- name: test-docker-debian12
box: generic/debian12
memory: 1536
cpus: 2
interfaces:
- auto_config: true
network_name: private_network
type: static
ip: 192.168.10.30
- name: test-docker-debian10
box: generic/debian10
memory: 512
cpus: 2
interfaces:
- auto_config: true
network_name: private_network
type: static
ip: 192.168.10.40
ip: 172.16.10.40
- name: test-docker-debian11
box: generic/debian11
memory: 512
memory: 1536
cpus: 2
interfaces:
- auto_config: true
network_name: private_network
type: static
ip: 192.168.10.50
ip: 172.16.10.50
- name: test-docker-archlinux
box: archlinux/archlinux
memory: 512
memory: 1536
cpus: 2
interfaces:
- auto_config: true
network_name: private_network
type: static
ip: 192.168.10.60
ip: 172.16.10.60

provisioner:
name: ansible
Expand Down
File renamed without changes.
3 changes: 0 additions & 3 deletions vars/ubuntu-18.yml

This file was deleted.

0 comments on commit a9f6aaa

Please sign in to comment.