Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mborne/ansible-docker-ce
[DEV] Ansible playbook to deploy and configure docker-ce
https://github.com/mborne/ansible-docker-ce
ansible docker setup
Last synced: 3 months ago
JSON representation
[DEV] Ansible playbook to deploy and configure docker-ce
- Host: GitHub
- URL: https://github.com/mborne/ansible-docker-ce
- Owner: mborne
- License: mit
- Created: 2021-11-25T12:16:22.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-07-15T13:54:02.000Z (6 months ago)
- Last Synced: 2024-10-08T15:15:49.035Z (3 months ago)
- Topics: ansible, docker, setup
- Language: Jinja
- Homepage:
- Size: 35.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ansible-docker-ce
[![CI](https://github.com/mborne/ansible-docker-ce/actions/workflows/ci.yml/badge.svg)](https://github.com/mborne/ansible-docker-ce/actions/workflows/ci.yml)
## Role Summary
This ansible playbook allows to setup and configure docker-ce. It aims at providing a decent setup for a dev environment :
* Most daemon options are defaulted to fit [docker-bench-for-security](https://github.com/docker/docker-bench-security#docker-bench-for-security) recommendations (see [doc/dbs-uncovered.md](doc/dbs-uncovered.md) for exceptions)
* Log rotate is configured to avoid disk full## Role Variables
See [defaults/main.yml](defaults/main.yml) to get the list of variables.
## Example Playbooks
Sample `requirements.yml` :
```
- name: mborne.docker_ce
src: git+https://github.com/mborne/ansible-docker-ce.git
version: master
```Sample basic playbook :
```yaml
---
- name: Install docker
hosts: all
become: yes
become_method: sudo
roles:
- mborne.docker_ce
```Sample basic playbook with [userns-remap](https://docs.docker.com/engine/security/userns-remap/) and custom storage location :
```yaml
---
- name: Install docker
hosts: all
become: yes
become_method: sudo
roles:
- mborne.docker_ce
vars:
docker_data_root: '/mnt/storage/docker'
docker_userns_remap: 'default'
```## Troubleshooting
For rasbperries, `aufs-dkms` should be removed to avoid problems :
```bash
sudo apt-get purge aufs-dkms
```## See also
* [geerlingguy.docker](https://galaxy.ansible.com/geerlingguy/docker)
## License
[MIT](LICENSE)