Ansible role to install Docker Engine via the official Docker apt repositories for Debian-family distributions. This role assumes a 64-bit installation and a kernel supported by Docker. See the Docker install guides for Debian or Ubuntu for more.
- Ansible 2.0+
- Debian-family distribution (current stable/LTS or newer)
###apt
The apt
role is used to add the official Docker repo along with signing keys.
See defaults/main.yml
for default values.
These variables should be set either as a dependency in meta/main.yml
for
your role, or as a part of your include statement. See below for examples.
Variable | Type | Description |
---|---|---|
docker_pkg |
List | List of apt packages to be installed |
This role includes tests which are run via Docker along with a Makefile to simplify the testing process.
External role dependencies are defined in a requirements
file which is used by the ansible-galaxy
command line tool. Roles are copied into tests/roles
which is
configured in ansible.cfg
as a search path.
A small shell script is used to resolve role dependencies and run Ansible within the container.
Note that because this role installs Docker within a Docker container, privledged mode is required by the top level container. This may have security implications depending on your setup.
Starting a test container:
make test
Cleaning up:
make clean
Add to your playbook as a role include:
---
- hosts: docker-hosts
roles:
- ansible-docker
- Source hosted at GitHub
- Report issues/questions/feature requests on GitHub Issues
Pull requests are very welcome! Make sure your patches are well tested. Ideally create a topic branch for every separate change you make. For example:
- Fork the repo
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Created and maintained by Chris Spicer (github@cspicer.ca).
MIT License (see LICENSE)