[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

[Short Tip] Call Ansible or Ansible Playbooks without an inventory

Ansible is a great tool to automate almost anything in IT. However, one of the core concepts of Ansible is the inventory where the to be managed nodes are listed. However, in some situations setting up a dedicated inventory is overkill.

[Short Tip] Retrieve your public IP with Ansible

There are multiple sources where variables for Ansible can be defined. Most of them can be shown via the setup module, but there are more. For example, if you use a dynamic inventory script to access a Satellite server many variables like the organization are provided via the inventory script – and these are not […]

[Short Tip] Show all variables of a host

There are multiple sources where variables for Ansible can be defined. Most of them can be shown via the setup module, but there are more. For example, if you use a dynamic inventory script to access a Satellite server many variables like the organization are provided via the inventory script – and these are not … Continue reading [Short Tip] Show all variables of a host

[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

[Short Tip] Call Ansible Tower REST URI – with Ansible

It might sound strange to call the Ansible Tower API right from within Ansible itself. However, if you want to connect several playbooks with each other, or if you user Ansible Tower mainly as an API this indeed makes sense. To me this use case is interesting since it is a way to document how … Continue reading [Short Tip] Call Ansible Tower REST URI – with Ansible

Ways to provide body payload in Ansible’s URI module

Talin to a REST API requires to provide some information, usually in the form of JSON payload. Ansible offers various ways to do that in the URI module in playbooks. In modern applications REST APIs are often the main API to integrate the given APP with the existing infrastructure. REST often requires posting JSON structures … Continue reading Ways to provide body payload in Ansible’s URI module

[Howto] Workaround failing MongoDB on RHEL/CentOS 7

MongoDB is often installed right from upstream provided repositories. In such cases with recent updates the service might fail to start via systemctl. A workaround requires some SELinux work. Ansible Tower collects system data inside a MongoDB. Since MongoDB is not part of RHEL/CentOS, it is installed directly form the upstream MongoDB repositories. However, with … Continue reading [Howto] Workaround failing MongoDB on RHEL/CentOS 7

Insights into Ansible: environments of called playbooks

Usually when Ansible Tower executes a playbook everything works just as on the command line. However, in some corner cases the behavior might be different: Ansible Tower runs its playbooks in a specific environment. Different playbook results in Tower vs CLI Ansible is a great tool for automation, and Ansible Tower enhances these capabilities by … Continue reading Insights into Ansible: environments of called playbooks