Skip to content

arcones/my-DRP

Repository files navigation

my-DRP 👩‍🚒

DRP: 💣 Disaster Recovery Plan 💥

Personal script to configure an Ubuntu host to work with it.

It uses ansible to install packages and configure the system as I like 👩‍💻

Test the playbook with a virtual machine

test diagram

Run the test

A Vagrantfile is prepared to test the playbook inside the VM that will be launched:

vagrant up # This will boot the Ubuntu virtual machine and run the playbook

vagrant provision # To rerun the whole playbook

# To rerun some tags:
ansible-playbook playbook.yml -i .vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory -u ansible -e user=vagrant -t user_config

vagrant destroy # To tear down the virtual machine

Execute the playbook versus remote real hosts

real hosts diagram

Requirements ⚠️

We rely on two users to provision:

  • ansible user which will be the one used to provision. We will create it in both control and target node
  • The user with which you have installed the Ubuntu OS. In these steps we will refer to it as jdoe

Following steps should be done:

  • [Target node] Ubuntu OS is installed. jdoe user has been created as part of the normal installation

  • [Target node] The script target_node.sh has run succesfully

  • [Control node] The script control_node.sh has run succesfully

Run it

ansible-playbook playbook.yml -i hosts -u ansible -e user=jdoe

Execute the playbook locally

real hosts diagram

Requirements ⚠️

Following steps should be done:

  • [Local node] Ubuntu OS is installed. jdoe user has been created as part of the normal installation
  • [Local node] The script local_node.sh has run succesfully

Run it

ansible-playbook --connection=local --inventory 127.0.0.1, playbook.yml -e user=jdoe

Build Status

About

Automatic provision of my workstation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages