Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/buluma/docker-molecule-shell
Molecule shell container for Ansible role testing.
https://github.com/buluma/docker-molecule-shell
ansible automation docker hacktoberfest2022 molecule tox
Last synced: about 1 month ago
JSON representation
Molecule shell container for Ansible role testing.
- Host: GitHub
- URL: https://github.com/buluma/docker-molecule-shell
- Owner: buluma
- License: mit
- Created: 2023-01-02T03:25:13.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-01-08T19:43:47.000Z (12 months ago)
- Last Synced: 2024-05-01T12:58:23.645Z (8 months ago)
- Topics: ansible, automation, docker, hacktoberfest2022, molecule, tox
- Language: Shell
- Homepage: https://hub.docker.com/r/buluma/docker-molecule-shell
- Size: 17.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Molecule Shell
A Shell Container to tests your [Ansible](https://www.ansible.com/) role using [Molecule](https://molecule.readthedocs.io/en/stable/).
# Usage
## Build the container
Clone the repository and build the container (needs docker installed)
```
git clone [email protected]:buluma/docker-molecule-shell.git
cd docker-molecule-shell/
docker build -t docker-molecule-shell:local -f Dockerfile .
```## Pull the container
```
docker pull ghcr.io/buluma/docker-molecule-shell:latest
```# Test ansible roles inside the container
Start the container
```
docker run -d --name docker-molecule-shell \
--cap-add SYS_ADMIN \
--privileged \
--cgroupns=host \
-v /sys/fs/cgroup:/sys/fs/cgroup:rw \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /PATH/TO/REPOSITORY/:/workspace \
ghcr.io/buluma/docker-molecule-shell:latest /usr/sbin/initdocker exec -it docker-molecule-shell /bin/bash
```