[Howto] Run programs as non-root user on privileged ports via Systemd

Running programs as a non-root user is must in security sensitive environments. However, these programs sometimes need to publish their service on privileged ports like port 80 – which cannot be used by local users. Systemd offers a simple way to solve this problem. Background Running services as non-root users is a quite obvious: if … Continue reading [Howto] Run programs as non-root user on privileged ports via Systemd

Ansible package moved from EPEL to extras

A few days ago the Ansible package was removed from EPEL and many ask why that happened. The background is that Ansible is now provided in certain Red Hat channels. What happened? In the past (pre-2017-10) most people who were on RHEL or CentOS or similar RHEL based systems used to install Ansible from the EPEL repository. … Continue reading Ansible package moved from EPEL to extras

[Howto] Reference Ansible variables between plays

Ansible’s strenght is to work with all kinds of devices and services – in one go. To properly call a variable value from one server while working on another host the variable needs to be referenced properly. One of the major strength about Ansible is the capability to almost seamlessly talk to different hosts, devices … Continue reading [Howto] Reference Ansible variables between plays

[Howto] Writing an Ansible module for a REST API

Ansible comes along with a great set of modules. But maybe your favorite tool is not covered yet and you need to develop your own module. This guide shows you how to write an Ansible module – when you have a REST API to speak to. Background: Ansible modules Ansible is a great tool to … Continue reading [Howto] Writing an Ansible module for a REST API

Useful command line options for ansible-playbook

Ansible provides quite some useful command line options. Most of them are especially interesting during debugging. Background There are three major ways to work with Ansible: launching single tasks with the ansible command executing playbooks viaansible-playbook using Tower to manage and run playbooks While Tower might be the better option to run Ansible in the … Continue reading Useful command line options for ansible-playbook

[Howto] Keeping temporary Ansible scripts

Ansible tasks are executed locally on the target machine. via generated Python scripts. For debugging it might make sense to analyze the scripts – so Ansible must be told to not delete them. When Ansible executes a command on a remote host, usually a Python script is copied, executed and removed immediately. For each task, … Continue reading [Howto] Keeping temporary Ansible scripts

[Howto] Access Red Hat Satellite REST API via Ansible

As with all tools, Red Hat Satellite offers a REST API. Ansible offers a simple way to access the API. Background Most of the programs and functions developed these days offer a REST API. Red Hat for example usually follows the “API first” methodology with most of the products these days, thus all functions of … Continue reading [Howto] Access Red Hat Satellite REST API via Ansible

[Howto] Looking up external directories in Ansible

Part of Ansible’s power comes from an easy integration with other systems. In this post I will cover how to look up data from external sources like DNS or Redis. Background A tool for automation is only as good as it is capable to integrate it with the already existing environment – thus with other … Continue reading [Howto] Looking up external directories in Ansible