[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

[Howto] Introduction to Ansible variables

To become more flexible, Ansible offers the possibility to use variables in loops, but also to use information the target system provides. Background Ansible uses variables to enable more flexibility in playbooks and roles. They can be used to loop through a set of given values, access various information like the hostname of a system … Continue reading [Howto] Introduction to Ansible variables

[Howto] Adopting Ansible Galaxy roles for Solaris

It is pretty easy to manage Solaris with Ansible. However, the Ansible roles available at Ansible Galaxy usually target Linux based OS only. Luckily, adopting them is rather simple. Background As mentioned earlier Solaris machines can be managed via Ansible pretty well: it works out of the box, and many already existing modules are incredible … Continue reading [Howto] Adopting Ansible Galaxy roles for Solaris