Skip to content

lestex/docker-centos7-ansible

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Centos7 docker image for testing ansible roles

Build Status

How to Build

  1. Install Docker.
  2. clone this repo
  3. cd into docker-centos7-ansible.
  4. Run docker build -t centos7 .

How to run

  1. Install Docker.
  2. Pull this image from Docker Hub: docker pull lestex/docker-centos7-ansible. Use the latest tag.
  3. Run a container from the image:
docker run -d --name test --privileged -v=/sys/fs/cgroup:/sys/fs/cgroup:ro lestex/docker-centos7-ansible /lib/systemd/systemd
  1. Use Ansible inside the container:
docker exec -it test ansible --version
docker exec -it test ansible-lint /path/to/ansible/playbook.yml

Author

Created by Andrey Larin