https://github.com/buluma/ansible-role-docker_env
Prepare My MacOS Docker Environment for local testing.
https://github.com/buluma/ansible-role-docker_env
ansible automation docker docker-containers docker-image hacktoberfest localhost macos setup
Last synced: about 2 months ago
JSON representation
Prepare My MacOS Docker Environment for local testing.
- Host: GitHub
- URL: https://github.com/buluma/ansible-role-docker_env
- Owner: buluma
- License: apache-2.0
- Created: 2022-08-14T09:20:24.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2026-04-03T07:59:28.000Z (3 months ago)
- Last Synced: 2026-04-03T14:18:31.874Z (3 months ago)
- Topics: ansible, automation, docker, docker-containers, docker-image, hacktoberfest, localhost, macos, setup
- Homepage: https://galaxy.ansible.com/buluma/docker_env
- Size: 129 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# [Ansible role docker_env](#ansible-role-docker_env)
Prepare Docker Environment for local testing.
|GitHub|Issues|Pull Requests|Version|Downloads|
|------|------|-------------|-------|---------|
|[](https://github.com/buluma/ansible-role-docker_env/actions/workflows/molecule.yml)|[](https://github.com/buluma/ansible-role-docker_env/issues/)|[](https://github.com/buluma/ansible-role-docker_env/pulls/)|[](https://github.com/buluma/ansible-role-docker_env/releases/)|[](https://galaxy.ansible.com/ui/standalone/roles/buluma/docker_env/documentation)|
## [Example Playbook](#example-playbook)
This example is taken from [`molecule/default/converge.yml`](https://github.com/buluma/ansible-role-docker_env/blob/master/molecule/default/converge.yml) and is tested on each push, pull request and release.
```yaml
---
- name: Converge
hosts: localhost
become: true
gather_facts: true
serial:
- 1
- 2
- 25%
- 50%
vars:
docker_requirements: docker
prepare_ubuntu: true
prepare_centos: true
prepare_rockylinux: true
prepare_fedora: true
prune_ubuntu: false
prune_centos: false
prune_rockylinux: false
prune_fedora: false
container_default_behavior: "compatibility"
roles:
- role: buluma.docker_env
```
The machine needs to be prepared. In CI this is done using [`molecule/default/prepare.yml`](https://github.com/buluma/ansible-role-docker_env/blob/master/molecule/default/prepare.yml):
```yaml
---
- name: Prepare
hosts: all
become: true
gather_facts: false
roles:
- role: buluma.bootstrap
```
Also see a [full explanation and example](https://buluma.github.io/how-to-use-these-roles.html) on how to use these roles.
## [Role Variables](#role-variables)
The default values for the variables are set in [`defaults/main.yml`](https://github.com/buluma/ansible-role-docker_env/blob/master/defaults/main.yml):
```yaml
---
# defaults file for docker_env
# default container variables
state: started
command: sleep 1d
privileged: true
interactive: true
tty: true
volumes:
- /sys/fs/cgroup:/sys/fs/cgroup:rw
capabilities:
- SYS_ADMIN
restart_policy: unless-stopped
container_default_behavior: no_defaults
# pull images/create containers
prepare_ubuntu: false
prepare_centos: false
prepare_rockylinux: false
prepare_fedora: false
# delete containers
prune_rockylinux: false
prune_centos: false
prune_ubuntu: false
prune_fedora: false
# prune everything, i.e. docker system prune
prune_everything: false
```
## [Requirements](#requirements)
- pip packages listed in [requirements.txt](https://github.com/buluma/ansible-role-docker_env/blob/master/requirements.txt).
## [State of used roles](#state-of-used-roles)
The following roles are used to prepare a system. You can prepare your system in another way.
| Requirement | GitHub |
|-------------|--------|
|[buluma.bootstrap](https://galaxy.ansible.com/buluma/bootstrap)|[](https://github.com/buluma/ansible-role-bootstrap/actions)|
|[buluma.epel](https://galaxy.ansible.com/buluma/epel)|[](https://github.com/buluma/ansible-role-epel/actions)|
|[buluma.python_pip](https://galaxy.ansible.com/buluma/python_pip)|[](https://github.com/buluma/ansible-role-python_pip/actions)|
|[buluma.docker](https://galaxy.ansible.com/buluma/docker)|[](https://github.com/buluma/ansible-role-docker/actions)|
## [Context](#context)
This role is part of many compatible roles. Have a look at [the documentation of these roles](https://buluma.github.io/) for further information.
Here is an overview of related roles:

## [Compatibility](#compatibility)
This role has been tested on these [container images](https://hub.docker.com/u/robertdebock):
|container|tags|
|---------|----|
|[Alpine](https://hub.docker.com/r/robertdebock/alpine)|all|
|[Debian](https://hub.docker.com/r/robertdebock/debian)|all|
|[Fedora](https://hub.docker.com/r/robertdebock/fedora)|all|
|[Ubuntu](https://hub.docker.com/r/robertdebock/ubuntu)|all|
The minimum version of Ansible required is 2.12, tests have been done on:
- The previous version.
- The current version.
- The development version.
If you find issues, please register them on [GitHub](https://github.com/buluma/ansible-role-docker_env/issues).
## [License](#license)
[Apache-2.0](https://github.com/buluma/ansible-role-docker_env/blob/master/LICENSE).
## [Author Information](#author-information)
[buluma](https://buluma.github.io/)