File: interpolate.yaml

package info (click to toggle)
python-hiyapyco 0.7.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 436 kB
  • sloc: python: 2,012; makefile: 237
file content (40 lines) | stat: -rw-r--r-- 799 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 smartindent
first: first element
firstcopy: "{{ first }}"
second: again {{ first }}
list:
    - abc
    - bcd
    - "cde"
    - "{{ list[0] }}"
elist:
deep:
    k1:
        - 10
        - 11
        - 12
    k2:
        - 22
        - 23
    k3:
        - ali
        - baba
        - and
        - the
        - 40
        - thieves
    interp:
        str: "{{ deep['k1'][0] }} + {{ deep.k2.1 }}"
        sum: "{{ deep['k1'][0] + deep.k2.1 }}"
        join: "{{ deep.k3|join(' ') }}"
m:
    - a: A
      b: "{{ undefined }}"
      c: "{{ deep.k3[0:2]|join(' ')|upper }}" 
    - a: B
      b: "{{ second }}"
      c: "{{ m.2.a }}" #this is not working because m.2.a must be interpolated too
    - a: "C & {{ m.0.a }}"
      b: cc
      c: ccc