Configuring Ansible to run commands on the provisioned resources

This is part 3 of the my series on automating my Home Lab. In this chapter, we will be integrating the inventory that was generated by terraform in the last episode. At the end of the exercise, the repository will look something like this with these changes. Ansible Setup You need to install Ansible using… Continue reading Configuring Ansible to run commands on the provisioned resources

Automatic Creation of Inventory from Terraformer

To use ansible on the resources provisioned by Terraformer, ansible needs to know the ips of the provisioned resources. We will be leveraging the local provider. This will allow us to create the inventory file using the output of terraformer. Add the following block to end of outputs.tf This requires the template file inventory.tmpl which… Continue reading Automatic Creation of Inventory from Terraformer

Setting up Terraform to provision a DigitalOcean Droplet

By following the example repo, I managed to setup a simple example app by following Hashicorps guide. I am summarizing the steps I took here for reference. For a more concrete explanation, check out the example docs. Get a DigitalOcean Token from here Run export DIGITALOCEAN_ACCESS_TOKEN=<API TOKEN> in your local shell cd terraform Generate a… Continue reading Setting up Terraform to provision a DigitalOcean Droplet

Published
Categorized as Terraform

Some useful Zsh extensions I use for simplifying Tmux

Tmux a command line based way of handling terminal panes. Its a very useful tool that I use whenever I open a terminal. Despite the utility of the said application, its interface is verbose and unwieldy. To combat that, I made some aliases and a zsh completion function that makes using Tmux a whole lot… Continue reading Some useful Zsh extensions I use for simplifying Tmux

How to set track pad settings on arch systems with libinput

My laptop when running Linux never enables click on tap by default. Given the heavy press required for clicking, this was a real hindrance to using the track pad. I also wanted to enable Natural Scrolling as I had gotten used to it. In Shell, type xinput list to get a list of devices and… Continue reading How to set track pad settings on arch systems with libinput

Want any window to work like Guake? Appearing and disappearing with a hotkey? Use this script

Requirements Linux, Mac has a nifty tool for this, which inspired this script X11 (X Window System), wmctrl doesn’t work with Wayland awk for text processing wmctrl for manipulating windows You should be able to get awk and wmctrl in your package manager of choice. You can clone the gist by this command After you… Continue reading Want any window to work like Guake? Appearing and disappearing with a hotkey? Use this script

Let Me Tell you about a C function called asprintf()

Before I begin, thanks to Suraj Pal, for his comments that improved this post. Now onto the scenario.Suppose you are working with a C/C++ function, passing around a string. This time you want to pass the variable by reference. This can be because: The string is big and you are working in a resource constrained… Continue reading Let Me Tell you about a C function called asprintf()

Using extern storage classifier to share variable across files in Embedded C

So, I was working on an ESP32 WROOM 32 chip for a hobby project. Specifically, working with connecting Xbox Controllers to the chip. The said chip is dual core and runs on FreeRTOS for scheduling tasks. I had never used any RTOS, and just jumped in on an example project. I split the modules of… Continue reading Using extern storage classifier to share variable across files in Embedded C