mainnet: use public_api flag to determin remapped port

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2024-06-18 11:43:08 +02:00
parent 9fa3af9a37
commit 30c13db7c8
No known key found for this signature in database
GPG Key ID: FE65CD384D5BF7B4
2 changed files with 6 additions and 5 deletions

View File

@ -3,13 +3,13 @@
beacon_node_rest_address: '0.0.0.0'
# Extract dynamically port form layout.
test_api_beacon_node_branch: 'unstable'
test_api_beacon_node_rest_index: |-
{{ nodes_layout[hostname]
| ansible.utils.index_of(test='eq', key='branch', value=test_api_beacon_node_branch)
| first }}
| ansible.utils.index_of(test='eq', key='public_api', value=True) }}
test_api_beacon_node_rest_port: |-
{{ beacon_node_rest_port_base + test_api_beacon_node_rest_index|int }}
test_api_beacon_node_branch: |-
{{ nodes_layout[hostname][test_api_beacon_node_rest_index|int].branch }}
redirect_ports:
- src: 80

View File

@ -3,12 +3,13 @@
beacon_node_rest_address: '0.0.0.0'
# Extract dynamically port form layout.
test_api_beacon_node_branch: 'testing'
test_api_beacon_node_rest_index: |-
{{ nodes_layout[hostname]
| ansible.utils.index_of(test='eq', key='branch', value=test_api_beacon_node_branch) }}
| ansible.utils.index_of(test='eq', key='public_api', value=True) }}
test_api_beacon_node_rest_port: |-
{{ beacon_node_rest_port_base + test_api_beacon_node_rest_index|int }}
test_api_beacon_node_branch: |-
{{ nodes_layout[hostname][test_api_beacon_node_rest_index|int].branch }}
# WARNING: This will change if number of nodes changes.
redirect_ports: