Skip to content

pprometey/ansible-tutorial-lab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ansible-tutorial-lab

Ansible tutorial lab environment with a ready-to-use Docker and VS Code Dev Containers setup. A step-by-step playground for practical Ansible learning and hands-on experience.

The full step-by-step course content can be found at:

To get the most out of the material, it is highly recommended to manually repeat all the steps of the guide by creating the required artifacts yourself. This will help you gain a deeper understanding of the processes and better retain the key concepts.

How to Use This Environment to Follow the Course

  1. Install Docker Desktop:

    For Windows, Mac, or Linux — follow the official instructions:
    https://docs.docker.com/get-docker/

  2. Clone the course repository:

    git clone https://github.com/pprometey/ansible-tutorial-lab.git

    Change into the cloned repository directory, which will be the root directory of the project:

    cd ansible-tutorial-lab
  3. Set up the environment variable for SSH keys:

    • Windows (PowerShell):

      [System.Environment]::SetEnvironmentVariable("DEFAULT_SSH_KEY", "<path_to_ssh_keys_folder>", "User")

      Then restart all VS Code windows.

    • Mac/Linux (bash):
      Add the following line to your ~/.bashrc or ~/.zshrc:

      export DEFAULT_SSH_KEY="<path_to_ssh_keys_folder>"

      Then run:

      source ~/.bashrc

      or restart your terminal.

    The specified folder must contain two files named id_rsa and id_rsa.pub — the private and public SSH keys that Ansible will use to connect to the target nodes.

  4. Verify that the variable is set:

    • Windows (PowerShell):

      $env:DEFAULT_SSH_KEY
    • Mac/Linux (bash):

      echo $DEFAULT_SSH_KEY
  5. Launch the isolated environment in VS Code with the Remote - Containers extension:

    • Open VS Code by running code .
    • Install the Remote - Containers extension if you haven't already.
    • Press F1 and select Remote-Containers: Reopen in Container.
      This will start containers for the Ansible master and the target nodes.

About

Ansible tutorial lab environment with ready-to-use Docker and VS Code Dev Containers setup. Step-by-step playground for practical Ansible learning and hands-on practice.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors