Changing Ansible Playbook Depending On Operating System (Ansible)

Ansible's when command

When running an Ansible playbook (or roles) it becomes a little bit irksome to have to create new playbooks just because a device may have a different operating system. Thankfully the awesome people behind Ansible have a solution for this. A Little Background... I have my inventory set in a file called "inventory" in the … Continue reading Changing Ansible Playbook Depending On Operating System (Ansible)

Using Ansible with AWS – Creating Multiple EC2 Instances, Tagging Them and ELK (AWS/Ansible)

An Ansible playbook to create multiple AWS EC2 instances

In my previous blog post I used Ansible to create an AWS EC2 instance and discussed how to do this via the Ansible ec2 module. Today I am going to go slightly more in depth with creating multiple instances, inventory groups and tagging. The playbook I am using for this section is "create_multiple_ec2_instances.yml" and can … Continue reading Using Ansible with AWS – Creating Multiple EC2 Instances, Tagging Them and ELK (AWS/Ansible)

Installing Go Compiler On Raspberry Pi 4 (Raspberry Pi OS 32-Bit)

Go (Golang) requires a compiler to build it's code and it only takes a few lines to install that compiler on the Raspberry Pi. I'm using a Raspberry Pi 4 with Raspberry Pi OS (32-bit). Download the appropriate binary release The binaries are available from https://golang.org/dl/ . The Raspberry Pi 4 is running on an … Continue reading Installing Go Compiler On Raspberry Pi 4 (Raspberry Pi OS 32-Bit)

Grafana, Prometheus and Node Exporter On Raspberry Pi via Ansible (Raspberry Pi and Linux)

Node Exporter dashboard showing system metrics

If you want to see metrics in real time and look at web dashboards then Grafana and Prometheus may be the tools you are looking for, and if you are anything like me then you probably want to automate as much of the install as possible via Ansible. My Set Up For this blog post … Continue reading Grafana, Prometheus and Node Exporter On Raspberry Pi via Ansible (Raspberry Pi and Linux)

AttributeError: partially initialized module has no attribute…(Python)

Python AttributeError: partially initialized module

Less of a blog post and more of a reminder to myself that when Python says: AttributeError: partially initialized module 'MODULE_NAME' has no attribute 'ATTRIBUTE_NAME' (most likely due to a circular import) It is normally because I have named my Python file the same as the module I am importing and caused a circular reference. … Continue reading AttributeError: partially initialized module has no attribute…(Python)