From 03cc946c65c987d7940e0e80b3276e27e6a2b232 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Beno=C3=AEt?= Date: Sun, 7 Aug 2022 22:33:42 +0200 Subject: [PATCH] Extract JSON from the Proxmox description --- inventory/01-fetch.proxmox.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/inventory/01-fetch.proxmox.yml b/inventory/01-fetch.proxmox.yml index fbe9c93..0d9ff6b 100644 --- a/inventory/01-fetch.proxmox.yml +++ b/inventory/01-fetch.proxmox.yml @@ -8,3 +8,10 @@ want_facts: true facts_prefix: proxmox__ group_prefix: proxmox__ want_proxmox_nodes_ansible_host: false + +compose: + # Raw data read from the "```ansible"-delimitated part of the description + inv__data: >- + ( ( proxmox__description | split( '```ansible' ) )[1] + | split( '```' ) )[0] + | from_json