https://github.com/petemcw/docker-ansible-ubuntu
Ubuntu Docker container for testing Ansible playbooks and roles.
https://github.com/petemcw/docker-ansible-ubuntu
ansible docker docker-image testing-tools
Last synced: 3 months ago
JSON representation
Ubuntu Docker container for testing Ansible playbooks and roles.
- Host: GitHub
- URL: https://github.com/petemcw/docker-ansible-ubuntu
- Owner: petemcw
- License: mit
- Created: 2016-12-20T21:40:05.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-12-21T19:59:56.000Z (over 9 years ago)
- Last Synced: 2024-12-30T06:12:59.848Z (over 1 year ago)
- Topics: ansible, docker, docker-image, testing-tools
- Language: Shell
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ubuntu 16.04 LTS (Xenial) 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-ubuntu .
```
## 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-ubuntu:latest /lib/systemd/systemd
```
- 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
```