Git Product home page Git Product logo

devops-portfolio's Introduction

ansible-automated-configuration

Project Title

Ansible Automated Configuration

Description

This project sets up an environment with Vagrant-managed virtual machines and configures them using Ansible. It's designed to showcase how to automate the provisioning and management of multiple servers.

Prerequisites

Before you begin, ensure you have the following installed:

Getting Started

1. Clone the Repository

Clone this repository to your local machine using:

git clone [email protected]:kamreo/devops-portfolio.git

2. Navigate to the Project Directory

Change into the project directory:

cd ansible-automated-configuration

3. Start Vagrant Machines

Navigate to the Vagrant directory and start up the virtual machines:

cd vagrant
vagrant up

This will read the Vagrantfile and provision the virtual machines as configured.

4. Verify Vagrant Machines

Ensure all Vagrant machines are running correctly:

vagrant status

5. Run the Ansible Playbook

Navigate back to the project root and run the Ansible playbook:

cd ..
ansible-playbook -i inventory.ini site.yml

This command runs the site.yml playbook using the hosts defined in inventory.ini.

6. Verify Configuration

After the playbook execution, verify that the configuration is applied correctly to the servers. How you do this will depend on what your playbook does (e.g., if it installs a web server, you might visit the IP of one of the VMs in a browser).

7. Accessing the Vagrant Machines

If you need to access the Vagrant machines directly, you can SSH into them:

vagrant ssh server1

Replace server1 with the appropriate machine name as defined in your Vagrantfile.

8. Stopping Vagrant Machines

When you’re done, you can stop the Vagrant machines:

vagrant halt

Troubleshooting

  • If Ansible can't connect to the Vagrant machines, ensure that SSH access is correctly set up and that the IP addresses and paths in the inventory.ini file are correct.
  • If you encounter errors with the tasks in the Ansible playbook, check the task's documentation and ensure all required parameters are provided.

devops-portfolio's People

Contributors

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