Giter Site home page Giter Site logo

vagrant-ansible-lab-virtualbox's Introduction

vagrant-ansible-lab-virtualbox

Credits: ginigangadharan

Forked From: vagrant-iac-usecases

This Vagrantfile creates 2 ansible nodes & 1 ansible engine. However, this script will not work in WSL/WSL2

Steps to Run:

  1. Clone the github repo

  2. Make sure Virtualbox is installed

  3. Make sure Vagrant is installed

  4. Make sure you have ssh keys present in ~/home/user/.ssh/ Follow this Guide to generate ssh keys

  5. Navigate to the location of the repository

  6. Run this command: vagrant up

  7. List status of running machines using: vagrant status

  8. Login to ansible-engine: vagrant ssh ansible-engine

  9. Check if you can ping ansible nodes: ping ansible-node-1

Congrats! You can now work on Ansible. Want to code in vs-code?

  1. You can open SSH into the remote container from vs-code using remote-ssh.

  2. To get the ssh config file for ansible-engine type vagrant ssh-config & copy the configuration for ansible-engine

  3. Copy the output your SSH config file โ€” I added it to my default SSH config at ~/.ssh/config

  4. You can use this info to SSH into container through vs-code & write scripts easily

To shut down the machines run: vagrant halt

vagrant-ansible-lab-virtualbox's People

Contributors

maheshrijal avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.