An open API service indexing awesome lists of open source software.

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.

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
```