https://github.com/petemcw/docker-ansible-centos
CentOS Docker container for testing Ansible playbooks and roles.
https://github.com/petemcw/docker-ansible-centos
ansible docker docker-image testing-tools
Last synced: about 2 months ago
JSON representation
CentOS Docker container for testing Ansible playbooks and roles.
- Host: GitHub
- URL: https://github.com/petemcw/docker-ansible-centos
- Owner: petemcw
- License: mit
- Created: 2016-12-21T20:33:36.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-12-21T21:42:55.000Z (over 9 years ago)
- Last Synced: 2025-08-11T23:34:53.687Z (11 months ago)
- Topics: ansible, docker, docker-image, testing-tools
- Size: 1.95 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CentOS 7 Ansible Test Image
**This image is not currently aimed at public consumption. It exists as an internal tool for testing [Ansible](http://www.ansibleworks.com/) development.**
## About
This is an image for testing Ansible playbooks and roles.
## Build
To build this as a Docker image, clone the repository and from within the project directory run:
```bash
docker build -t docker-ansible-centos .
```
## Usage
- Run a container from the image:
```
docker run --detach --privileged \
--volume=/sys/fs/cgroup:/sys/fs/cgroup:ro \
--volume=$(pwd):/etc/ansible/roles/test_role:ro \
petemcw/docker-ansible-centos:latest /usr/sbin/init
```
- Run Ansible inside the container:
```
docker exec --tty env TERM=xterm ansible --version
docker exec --tty env TERM=xterm \
ansible-playbook /etc/ansible/roles/test_role/tests/test.yml --syntax-check
```