From c7f690c66939d20080a657622fa454b8b3e9f81e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Mass=C3=A9?= Date: Thu, 27 Aug 2020 14:15:02 +0200 Subject: [PATCH] combine example --- combine.yaml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 combine.yaml diff --git a/combine.yaml b/combine.yaml new file mode 100644 index 0000000..3fe611f --- /dev/null +++ b/combine.yaml @@ -0,0 +1,30 @@ +--- + +- name: TODO + gather_facts: no + hosts: localhost + tasks: + - block: + - debug: + var: output + - assert: + that: + - output.type == "person" + - output.spec.firstname == "jane" + - output.spec.lastname == "doe" + - output.extended_spec.age == 21 + vars: + output: "{{ input1|combine(input2, recursive=True) }}" + input1: + type: person + spec: + firstname: john + lastname: doe + extended_spec: {} + input2: + spec: + firstname: jane + extended_spec: + age: 21 + +