Initial commit of role files and readme.

This commit is contained in:
Nils Cant
2019-08-20 15:04:06 +02:00
parent 93f28fc00e
commit 78965c8994
9 changed files with 115 additions and 0 deletions

View File

@@ -1,2 +1,31 @@
# ansible-role-docker
This role installs docker-ce (Docker Community Edition) on a Debian system. (Tested on Stretch and Buster) It also exposes the Docker socket over TCP on port 2376, using X509 TLS certificates to enable / disable access.
## Prerequisites
Ensure that the fqdn (hostname -f) of the host is resolvable through dns.
## Example playbook
```
---
- hosts:
- hostname
roles:
- role: docker
```
## Copy TLS certificates
Copy /root/.docker/<fqdn> to your local home directory.
## Remotely connect to your docker host
```
echo 'export DOCKER_HOST=tcp://<hostname>:2376
export DOCKER_CERT_PATH=~/.docker/<hostname>
export DOCKER_TLS_VERIFY=1' > vars
source vars
docker info
```