-
Notifications
You must be signed in to change notification settings - Fork 4
/
c0029.yml
71 lines (62 loc) · 1.47 KB
/
c0029.yml
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
doc_meta: |
folder: dvars
title: dvars in scopes
head: |
Similarly to the process that vars loading sequence, dvars in scopes follow the same sequence to be loaded from global group, then group, then instance id, then runtime global, then local scope in func
sections:
- title: Demo
log: yes
notes:
goal:
- to test out dvars rendering in scope
- it loads global vars first, then render dvars and merge it with vars in global scope
- it then merge nonprod vars to global as runtimevars, then
- render dvars based on runtimevars, then
- continue same idea down to individual runtime intance vars/dvars process
expected:
cmd1: da -> global-a
cmd2: dab -> global-a-and-global-b
cmd3: non-prod-a
scopes:
-
name: global
vars:
a: global-a
b: global-b
c: global-c
e: global-e
dvars:
- name: da
value: "{{.a}}"
- name: dab
value: "{{.a}}-and-{{.b}}"
-
name: nonprod
members:
- dev
- staging
vars:
a: non-prod-a
b: non-prod-b
c: non-prod-c
d: non-prod-d
dvars:
- name: dvar_np_a
value: "{{.a}}"
- name: dab
value: "{{.a}}-and-{{.b}}"
-
name: staging
vars:
a: staging-a
b: staging-b
tasks:
-
name: task
task:
-
func: shell
do:
- echo "cmd1:da -> {{.da}}"
- echo "cmd2:dab -> {{.dab}}"
- echo "cmd3:{{.dvar_np_a}}"