Hero Image

Blog

New Hard Drive rituals

New Hard Drive rituals

That new hard drive. Should you trust it? Maybe.

Over the last 10 years that I've been messing around with Linux servers (hence the name of the site by the way) there's been one thing above all else that's always required special care - hard drives. They are mechanical beasts just waiting to eat y...

29th Oct 2018 - IronicBadger
Concatenate a complex string in Ansible

Concatenate a complex string in Ansible

Constructing a long, complex string in Ansible can be achieved quite easily utilising Python string subsitution syntax.

Suppose you have the following variables:

app_protocol: http
app_host: 12.34.56.78
app_port: 8080
app_path: api/v2/testing

You could construct a string with all the component...

4th Jul 2018 - IronicBadger
Query instance specific information on AWS

Query instance specific information on AWS

When working in a dynamic environment you can use the following syntax to query an instance for information about itself.

I found this very useful when needing to discover which availability zone an instance was running in, for example.

curl http://169.254.169.254/latest/dynamic/instance-identit...

21st Jun 2018 - IronicBadger
How to configure systemd boot with UEFI

How to configure systemd boot with UEFI

Today we will cover configuring a Linux system to boot using systemd boot on a UEFI system.

Firstly you'll need to check you're booted into EFI mode. You can do this with dmesg | grep "EFI v".

Sometimes it's possible to boot your system from legacy BIOS mode instead of UEFI mode - look for the...

17th May 2018 - IronicBadger
The dangers of pulling :latest

The dangers of pulling :latest

On a wonderful sunny Sunday morning, I spent a good few hours sweating over my server in the hopes of restoring a partially corrupted and misconfigured database. Why? Because I was pulling mysql:latest.

This should serve as a case study for those that live on the edge - it's not always wise to c...

22nd Apr 2018 - Josh Stark
Ansible Tip - Using the expect module

Ansible Tip - Using the expect module

Another Ansible top tip. Suppose you are running an installer or other process via Ansible which expects the user to be present accept a license agreement, enter some information or something. Enter expect, a handy little utility which can listen for certain strings in stdout and react accordingly...

23rd Mar 2018 - IronicBadger
Ansible Tip - Referencing items from a hash

Ansible Tip - Referencing items from a hash

Let's say you are in the midst of writing an Ansible playbook and you need to reference multiple values from an 'item' in different places. Here's a neat code snippet that will allow you to do just that.

hosts: all 
vars:
  file_path_1: /usr/bin
  file_path_2: /example
  file_path_3: /opt
tasks:...
23rd Mar 2018 - IronicBadger