Use Ansible to get OS package version (even with a dash)

ansible package version
Get the OS package versions using Ansible, addressing challenges with package names containing dashes. The process involves using the package_facts module. Despite complexities, the approach ensures accurate version retrieval, even with dashes in package names.

Run different Linux program based on current directory (using Bash shell)

This provides a way for using different versions of a program based on the current directory name. By adding this example code to the .bashrc file, users can run a unique terraform version based on the directory name.

Docker and Trouble with Red Hat Enterprise Linux 9: iptables

Red Hat Enterprise Linux 9 (RHEL 9) and Docker don’t get along very well. Running a container that requires older iptables (and not nftables) can be a problem.

Ansible Quick Tip: How to add an Inline Comment

How to add an inline comment using Ansible.

Helm Post-Renderer and an ugly Windows Batch Script

The year is 2021, and I need to write a Windows Batch Script to get Helm Post-Renderer working on Windows so I can deploy my application to Kubernetes.

Secure Docker with iptables firewall and Ansible

Out of the box, security with Docker (and Docker Swarm) over the network is bad. Okay, that’s not entirely true. Out of the box when you have no containers started, it’s fine. But after you start a container, and if you publish a port, they are exposed to the outside world by default. And it’s not easy to fix. You need to create a custom Docker firewall with iptables.
 

How to fix Ubuntu 20.04 in 1 step

There’s not a lot wrong with Ubuntu 20.04. So it’s pretty easy to fix the one thing that’s missing! Hint: Install the Cinnamon Desktop.

Docker and the iptables INPUT chain

When testing Docker and iptables I stumbled upon something interesting. It appears Docker uses the iptables INPUT chain in an undocumented way. Well that’s interesting..

Manage firewalld with Ansible

Ansible manage firewalld Managing firewalld can be a tricky. Especially if you have many servers to manage. Ansible can help manage firewalld rules for you!

Find Version Tag for Latest Docker Image

If you’ve ever used Docker, you’ve probably used the latest Docker image tag. This is bad. Do not do this! You will be in a situation where you need to find what version you were actually using. This is how you can find the version of that “latest” image you have running.