Skip to content

Practice Ansible only. With this Zero Configuration needed project setup an Ansible lab in sections with little to no steps required πŸ™‚

Notifications You must be signed in to change notification settings

stanleyogada/docker-ansible-env-setup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

51 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

DOCKER ANSIBLE LAB

Note:
This will create 5 nodes in total
3 Ubuntu and 2 Oracle-Linux machines
See the docker-compose.yaml

Prerequisites

  • Have Docker installed
  • Have Docker Compose installed
  • Start the Docker daemon
  • You might want to add your user to the docker group for Ubuntu
  • And optionally, install my version (check the screenshot below) of higher image

Usage

Horror.Ansible.Project.mp4
  1. Git clone the repo and cd to it.
  2. Run docker-compose up -d.
  3. Then view the logs, run docker-compose logs -f
  4. Wait for about 1-5 minutes for a message like "SUCCESS! ... Happy hacking!"
  5. Your lab is ready!

Usage for the control-host

  1. Open a fresh terminal for each one
  2. Run docker container exec -it control-host bash
  3. Stay as root user.
  4. Then in the container, run cd ~/ansible-project as this is your base ansible directory
  5. Your lab is ready! You can now control and configure all servers. Run ansible all -m ping to test your servers' connections.

Note: Each of the 4 nodes (each server node)
have the following default user credentials on them.
username: zero
password: ][poiuy

Usage for servers (There are 4 four servers, this is an example for just server-1)

  1. Open a fresh terminal for each one
  2. Run docker container exec -it server-1 bash
  3. Then switch to zero user, run su - zero use \][poiuy as the password.

For more, also check out this blog post:

About

Practice Ansible only. With this Zero Configuration needed project setup an Ansible lab in sections with little to no steps required πŸ™‚

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages