Skip to content

Docker environment for completing the Udemy Mastering Ansible course

Notifications You must be signed in to change notification settings

tdm00/udemy-mastering-ansible

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Udemy Mastering Ansible Course

I recently purchased the Udemy Mastering Ansible Course. The course instructor mentions that he is using a Docker environment for the exercises, however I wasn't able to find a copy of this configuration to use. While there is a Vagrant file provided, I'd prefer not to install VMware Fusion or VirtualBox if I can avoid it and already have Docker for macOS installed.

Course Topology

The topology of the course, provided by the instructor, is included in the Topology.pdf file within this repository.

Requirements

To make use of this repository you'll need the following software.

Note: I have only tested this on the Mac, but believe it should also work on a Linux system. For my Windows friends you may need to make modifications to the Dockerfile in the control and base directories. I don't have access to a Windows system to test.

Getting Started

  1. Clone the repository to your machine

  2. Install Docker for macOS, if you haven't already

  3. Start Docker for macOS so that it is running

  4. Open a terminal session and change to the directory on your machine where you cloned the repository

  5. Build and start the environment:

    docker-compose up --build -d

  6. Connect to the Control Machine container

    docker container exec -it udemy-mastering-ansible_control_1 bash

  7. Verify the Control Machine container is able to communicate with the Managed Node containers

    ansible all -m ping

Note: the ansible directory on your host will be mounted to the Control Machine container under /var/ansible. Any changes you make on your host to the ansible directory will show up in your Control Machine container. This allows you to use a text editor, like Atom, to write your Ansible configuration on the host machine and run it in the Control Machine container without losing it once the containers are shutdown.

Commands

Startup the Environment

docker-compose up --build -d

Connect to the Environment

docker container exec -it udemy-mastering-ansible_control_1 bash

Shutdown The Environment

docker-compose down --remove-orphan

Update to latest project version

git pull Note: This should not change any of your files in the ansible/ directory within your clone of this project.

Bugs, Corrections or Enhancements

If you find a bug, something that needs to be corrected, or a possible enhancement, please create an issue or better yet submit the fix through a Pull Request.

About

Docker environment for completing the Udemy Mastering Ansible course

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published