generated from ethpandaops/template-devnets
-
Notifications
You must be signed in to change notification settings - Fork 2
/
ansible_inventory.tmpl
57 lines (45 loc) · 1.6 KB
/
ansible_inventory.tmpl
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
localhost
[all:vars]
ethereum_network_name=${ethereum_network_name}
%{ for gid, group in groups ~}
[${replace(gid, "-", "_")}]
%{ for key, host in hosts ~}
%{ if host.group == gid ~}
${host.hostname} ansible_host=${host.ip} ipv6=${host.ipv6} cloud=${host.cloud} cloud_region=${host.region} ethereum_node_cl_supernode_enabled=${host.supernode} %{ if max(host.validator_start, host.validator_end) != 0 }validator_start=${host.validator_start} validator_end=${host.validator_end}%{ endif }
%{ endif ~}
%{ endfor ~}
%{ endfor ~}
# Consensus client groups
%{ for cl in ["lighthouse", "lodestar", "nimbus", "teku", "prysm", "grandine"] ~}
[${cl}:children]
%{ for gid, group in groups ~}
%{ if split("-", gid)[0] == "${cl}" ~}
${replace(gid, "-", "_")}
%{ endif ~}
%{ endfor ~}
%{ endfor ~}
# Execution client groups
%{ for el in ["besu", "ethereumjs", "geth", "nethermind", "erigon", "reth"] ~}
[${el}:children]
%{ for gid, group in groups ~}
%{ if split("-", gid)[0] != "bootnode" && split("-", gid)[0] != "xatu" ~}
%{ if split("-", gid)[1] == "${el}" ~}
${replace(gid, "-", "_")}
%{ endif ~}
%{ endif ~}
%{ endfor ~}
%{ endfor ~}
# Global groups
[consensus_node:children]
%{ for x,y in merge( { for gid, group in groups : split("-", gid)[0] => true... if split("-", gid)[0] != "bootnode" && split("-", gid)[0] != "xatu" } ) ~}
${x}
%{ endfor ~}
[execution_node:children]
%{ for x,y in merge( { for gid, group in groups : split("-", gid)[1] => true... if split("-", gid)[0] != "bootnode" && split("-", gid)[0] != "xatu" } ) ~}
${x}
%{ endfor ~}
[ethereum_node:children]
consensus_node
execution_node
[goomy:children]
bootnode