Browse Source

add key-value

master
Nicolas Massé 4 years ago
parent
commit
1a9f642356
  1. 15
      key-value.yaml

15
key-value.yaml

@ -0,0 +1,15 @@
- name: Jinja dict to key/value list
gather_facts: no
hosts: localhost
vars:
expected: param1=foo,param2=bar
input:
param1: foo
param2: bar
output: '{{ input.items() | map("join", "=") | sort | join(",") }}'
tasks:
- debug:
var: output
- assert:
that:
- output == expected
Loading…
Cancel
Save