generated from ethpandaops/template-devnets
-
Notifications
You must be signed in to change notification settings - Fork 7
/
ansible_inventory.tmpl
54 lines (43 loc) · 1.43 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
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} %{ 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" ~}
%{ 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" } ) ~}
${x}
%{ endfor ~}
[execution_node:children]
%{ for x,y in merge( { for gid, group in groups : split("-", gid)[1] => true... if split("-", gid)[0] != "bootnode" } ) ~}
${x}
%{ endfor ~}
[ethereum_node:children]
consensus_node
execution_node