From f0f4db3ca81059924a2a656f83353e53de19b701 Mon Sep 17 00:00:00 2001 From: jifox Date: Fri, 15 Dec 2023 05:57:00 +0100 Subject: [PATCH 1/3] Add documentation about the transform function --- docs/plugins/index.rst | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/docs/plugins/index.rst b/docs/plugins/index.rst index b94ceee8..83dc29ab 100644 --- a/docs/plugins/index.rst +++ b/docs/plugins/index.rst @@ -19,17 +19,17 @@ To do so you can use `entry points Date: Mon, 18 Dec 2023 05:07:28 +0100 Subject: [PATCH 2/3] Undo unwanted changes --- docs/plugins/index.rst | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/docs/plugins/index.rst b/docs/plugins/index.rst index 83dc29ab..b94ceee8 100644 --- a/docs/plugins/index.rst +++ b/docs/plugins/index.rst @@ -19,17 +19,17 @@ To do so you can use `entry points Date: Mon, 18 Dec 2023 05:08:51 +0100 Subject: [PATCH 3/3] redo change --- docs/plugins/index.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/plugins/index.rst b/docs/plugins/index.rst index b94ceee8..41a95269 100644 --- a/docs/plugins/index.rst +++ b/docs/plugins/index.rst @@ -75,6 +75,8 @@ Transform functions A transform function is a plugin that manipulates the inventory independently from the inventory plugin used. Useful to extend data using the environment, a secret store or similar. +During inventory initialization, the transform function will be called in a for loop for each host. The transform function takes a host object as the first parameter and additional keyword arguments as specified in the `config.inventory.transform_function_options` dictionary. + Runners _______