On Tue, 14 Jun 2022 04:25:06 -0700 (PDT) jean-christophe manciot <[email protected]> wrote:
> var:
> key_1: value_11
> key_2: value_21
> key_3: value_31
>
> So the goal is to transform the first var into:
> var:
> - key_1: value_11
> key_2: value_21
> key_3: value_31
Simply close it in the brackets. For example,
- debug:
msg: "{{ [var] }}"
gives
msg:
- key_1: value_11
key_2: value_21
key_3: value_31
, or
var2: "{{ [var] + [var] }}"
gives
var2:
- key_1: value_11
key_2: value_21
key_3: value_31
- key_1: value_11
key_2: value_21
key_3: value_31
--
Vladimir Botka
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/20220614153528.1e98ea89%40gmail.com.
pgp_KzPboWKwf.pgp
Description: OpenPGP digital signature
