Coder Social home page Coder Social logo

ansible-playbook-default-setup's Introduction

This is my attempt to have a Ansible playbook of my usual dev setup. It is based on what I learned so far by reading "Ansible for DevOps".

Setup

Install Ansbile

$ sudo apt-add-repository -y ppa:ansible/ansible
$ sudo apt-get update 
$ sudo apt-get install -y ansible

Run the playbook

Should just be ansible-playbook --connection=local --inventory 127.0.0.1, --ask-become-pass playbook.yml

Testing

To be able to test the playbook I use Vagrant and an Ubuntu box in VirtualBox.

Install Vagrant

$ wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg
$ echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
$ sudo apt update && sudo apt install vagrant

Install Virtualbox

Should be available from Ubuntu packages, just sudo apt install virtualbox.

Test the playbook on VM

The Vagrantfile has already been changed to use the playbook for provisioning. Running vagrant up will run the playbook once the VM is up. To rerun the playbook on the already running VM run vagrant provision. To retest from scratch first run vagrant destroy followed by vagrant up.

ansible-playbook-default-setup's People

Contributors

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