Git Product home page Git Product logo

ansible-dynamic-inventory's Introduction

ansible-dynamic-inventory

This repository shows a step-by-step approach of implementing Ansible Dynamic inventory.

Pre-requisite

To simulate VM's we are using Docker, so Docker is the only pre-requisite. Also you have to build the docker images for control server and target VM's

    make build

High Level Flow

We are simulating Dynamic inventory in 3 steps:

  • Step 1
    • Create initial setup with an Ansible control server and 2 VM's (vm1 & vm2)
    • Use anible ping module to validate if control server can talk to 2 VM's
  • Step 2
    • Add 3 more VM's(vm3, vm4 & vm5) in the overall setup
    • Use ansible ping module to validate if control server can talk to all VM's
  • Step 3
    • Delete 2 VM's(vm1 & vm2) in the overall setup
    • Use ansible ping module to validate if control server can talk to remaining VM's(vm3, vm4 & vm5)

Detailed Flow

We will be doing a gradual move to dynamic inventory solution

  • Implement dynamic inventory by updating static inventory file as per chaning infrastructure
cd static_inventory
make run-simulation

  • Implement dynamic inventory by replacing inventory file via corresponding json file but still changing inventory file as per changing infrastructure
cd json_static_inventory
make run-simulation

  • Implement dynamic inventory by replacing inventory file via a bash script, but still the bash script will be updated as per changing infrastructure
cd dynamic_inventory_sol1
make run-simulation

  • Implement dynamic inventory by replacing inventory file via a bash script, this bash script will actually get the VM details at runtime
cd dynamic_inventory_sol2
make run-simulation

ansible-dynamic-inventory's People

Contributors

sandy724 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.