Skip to content
/ ansible Public

Docker images for running and testing ansible playbooks with various operating systems.

Notifications You must be signed in to change notification settings

pauvos/ansible

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ansible

Docker images for running and testing ansible playbooks with various operating systems.

I don't like obfuscated Dockerfiles with external scripts and hundreds of bells and whistles, so I created these simple ones.

Available operating systems:

  • alpine-3
  • centos-7
  • debian-8
  • fedora-24
  • ubuntu-16.04

run playbooks

docker run -it --rm \
    -w /site \
    -v /path/to/site/:/site \
    -v /path/to/ansible-user-ssh/:/root/.ssh:ro \
    --tmpfs /root/.ansible \
    chmuul/ansible:alpine-3 \
    ansible-playbook site.yml

Note: /root/.ansible must not be an overlayfs, otherwise ssh accelerate won't work.

run tests with drone.io

build:
  image: chmuul/ansible:$$OS
  commands:
    - ansible-playbook -i tests/inventory tests/main.yml --syntax-check
    - ansible-playbook -i tests/inventory tests/main.yml

matrix:
  OS:
    - centos-7
    - debian-8
    - fedora-24
    - ubuntu-16.04

run tests with travis-ci

sudo: required

env:
- OS: centos-7
- OS: debian-8
- OS: fedora-24
- OS: ubuntu-16.04

services:
- docker

before_install:
- docker pull chmuul/ansible:${OS}

script:
- docker run -t -w /site -v $(pwd):/site chmuul/ansible:${OS} ansible-playbook -i tests/inventory tests/main.yml --syntax-check
- docker run -t -w /site -v $(pwd):/site chmuul/ansible:${OS} ansible-playbook -i tests/inventory tests/main.yml

references

About

Docker images for running and testing ansible playbooks with various operating systems.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published