From 7fcaee1c0507a426a3fd24cd44a1e64672fcb67a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Mass=C3=A9?= Date: Thu, 27 Aug 2020 14:18:33 +0200 Subject: [PATCH] combine example --- combine.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/combine.yaml b/combine.yaml index 3fe611f..0195c67 100644 --- a/combine.yaml +++ b/combine.yaml @@ -1,6 +1,6 @@ --- -- name: TODO +- name: Merge two hashes with combine gather_facts: no hosts: localhost tasks: @@ -13,6 +13,7 @@ - output.spec.firstname == "jane" - output.spec.lastname == "doe" - output.extended_spec.age == 21 + - output.extra.knows == "ansible" vars: output: "{{ input1|combine(input2, recursive=True) }}" input1: @@ -26,5 +27,7 @@ firstname: jane extended_spec: age: 21 + extra: + knows: ansible