2024-11-28 01:14:34 +08:00
|
|
|
[.enthalpy_public_key_pem as $keys | .hosts as $hosts | .enthalpy_organizations | to_entries[] as $org | {
|
|
|
|
"public_key": $keys[$org.key],
|
|
|
|
"organization": $org.value,
|
|
|
|
"nodes": [$hosts | to_entries[] | select(.value.enthalpy_node_organization == $org.value) | {
|
|
|
|
"common_name": .key,
|
|
|
|
"endpoints": [
|
|
|
|
{
|
|
|
|
"serial_number": "0",
|
|
|
|
"address_family": "ip4",
|
2024-12-16 18:08:56 +08:00
|
|
|
"address": "\(.key)\(if .value.endpoints_v4 == [] then ".dyn" else "" end).rebmit.link",
|
2024-12-21 13:36:14 +08:00
|
|
|
"port": 14000
|
2024-11-28 01:14:34 +08:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"serial_number": "1",
|
|
|
|
"address_family": "ip6",
|
2024-12-16 18:08:56 +08:00
|
|
|
"address": "\(.key)\(if .value.endpoints_v6 == [] then ".dyn" else "" end).rebmit.link",
|
2024-12-21 13:36:14 +08:00
|
|
|
"port": 14000
|
2024-11-28 01:14:34 +08:00
|
|
|
}
|
|
|
|
],
|
|
|
|
}]
|
|
|
|
}]
|