Member-only story

Ansible ansible.builtin.tree Callback Saving Host Events to Files

Unveiling the Power of ansible.builtin.tree Callback: Enhanced Visibility and Control in Ansible Automation

Luca Berton

--

Introduction

Ansible, an open-source automation tool, is renowned for its ability to streamline IT tasks and configuration management. One of Ansible’s powerful features is its extensible callback system, which allows users to capture and handle events triggered during playbook execution. In this article, we’ll delve into the ansible.builtin.tree callback, introduced in Ansible-core version 2.11, and explore how it can be utilized to save host events to files.

Understanding the Callback Parameters

directory Parameter

The directory parameter is a crucial component of the ansible.builtin.tree callback. It specifies the path to the directory where per-host JSON files will be saved. When using ad-hoc commands, this directory can be set using the --tree option. The default directory is "~/.ansible/tree."

Let’s break down the relevant details:

  • Added in Ansible-core 2.11…

--

--

Luca Berton
Luca Berton

Written by Luca Berton

I help creative Automation DevOps, Cloud Engineer, System Administrator, and IT Professional to succeed with Ansible Technology to automate more things everyday

No responses yet