Skip to content
Snippets Groups Projects
Chris Croome's avatar
Chris Croome authored
5d427119
History

Webarchitects Ansible Docker Role

pipeline status

Ansible Role to install Docker CE on Debian and Ubuntu.

This role can also optionally install the last version of docker-compose version 1, Docker Compose 1.29.2 and Compose Switch.

See the defaults/main.yml for the default settings and vars/main.yml for the gpg and apt variables.

See the documentation for the Docker daemon config file for all the options available and convert these to YAML for use by this role, for example:

docker_daemon:
  storage-driver: overlay2
  log-driver: syslog
  dns:
    - 1.1.1.1
    - 8.8.8.8
    - 9.9.9.9

The role uses .sources rather than .list files for apt and it also checks the gpg public key used to sign packages against the vars/main.yml and limits what packages can be installed from the Docker repo, based on the Debian wiki page with instructions to connect to a third-party repository.

This role requires jc version 1.20.2 or later to be installed on the Ansible controller using pip for the parsing of GPG command output, jc can be installed using Ansible, or simply run:

pip3 install jc

The primary URL of this repo is https://git.coop/webarch/docker however it is also mirrored to GitHub and available via Ansible Galaxy.

If you use this role please use a tagged release, see the release notes.

See also the localhost repo for using this role to install Docker on the localhost.