Personal ansible lab with docker compose based on openSUSE Tumbleweed
Pull the image
docker pull theovercloud/osuseansible -aClone this repo
git clone https://github.com/wverac/ansible_lab.gitCreate a new pair of SSH Keys
cd ansible_labssh-keygen -q -N '' -f files/ansiblelab_keyStart the lab
docker-compose up -dLogin into control node
docker exec -ti control /bin/bashTest the initial configuration
ansible all -m ping -oHappy hacking!
This lab has 3 nodes in addition to the control node initially, but you can scale by editing docker-compose.yml file, e.g.
scale: 6Or pass the parameter when starting the lab
docker-compose up --scale tumbleweed=6Don't forget to add the new hosts to the inventory files/inventory
I'm using an image based on openSUSE Tumbleweed with the basic packages to run this lab, I did not install systemd (I started the SSH service old school style) in order to don't make this image bigger.
You can find the image on Docker HUB
https://hub.docker.com/r/theovercloud/osuseansible
You can also find the dockerfile in this repo
If you prefer use a Debian image, I also made a small one for this lab:
docker pull theovercloud/debianansible -aContact: wv@linux.com
- Create a dynamic inventory according to the number of nodes scaled
Add a debian image as node optionAdd troubleshooting packages to the control imageAdd screenshots