From 3adc241e4d7544f7cf5bfd7954a3139cb6590745 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Soko=C5=82owski?= Date: Thu, 9 May 2019 18:18:46 +0200 Subject: [PATCH] use new refactored beacon-node role in a loop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jakub SokoĊ‚owski --- ansible/main.yml | 67 ++++++++++++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 30 deletions(-) diff --git a/ansible/main.yml b/ansible/main.yml index 6520353..59dd800 100644 --- a/ansible/main.yml +++ b/ansible/main.yml @@ -3,37 +3,44 @@ hosts: nimbus-master roles: - { role: origin-cert } - # - { role: infra-role-eth2-testnet-site } - { role: nimbus-stats, tags: nimbus-stats } - - { role: infra-role-beacon-node, - beacon_node_network: 'testnet0', - beacon_node_build_flavour: 'rlpx', - beacon_node_total_nodes: 2, - beacon_node_running_nodes: 2, - beacon_node_discovery_port: 9000, - beacon_node_listening_port: 9000 } - - { role: infra-role-beacon-node, - beacon_node_network: 'testnet1', - beacon_node_build_flavour: 'rlpx', - beacon_node_total_nodes: 5, - beacon_node_running_nodes: 2, - beacon_node_discovery_port: 9100, - beacon_node_listening_port: 9100 } + # - { role: infra-role-eth2-testnet-site } + tasks: + - include_role: + name: infra-role-beacon-node + with_sequence: count=2 + vars: + beacon_node_network: 'testnet0' + beacon_node_public_tcp_port: '{{ 9000 + item|int }}' + beacon_node_public_udp_port: '{{ 9000 + item|int }}' + beacon_node_cont_name: 'beacon-node-{{ beacon_node_build_flavour }}-{{ beacon_node_network}}-{{ item }}' + + - include_role: + name: infra-role-beacon-node + with_sequence: count=2 + vars: + beacon_node_network: 'testnet1' + beacon_node_public_tcp_port: '{{ 9100 + item|int }}' + beacon_node_public_udp_port: '{{ 9100 + item|int }}' + beacon_node_cont_name: 'beacon-node-{{ beacon_node_build_flavour }}-{{ beacon_node_network}}-{{ item }}' - name: Configure Nimbus cluster hosts: nimbus-slaves - roles: - - { role: infra-role-beacon-node, - beacon_node_network: 'testnet0', - beacon_node_build_flavour: 'rlpx', - beacon_node_total_nodes: 2, - beacon_node_running_nodes: 2, - beacon_node_discovery_port: 9000, - beacon_node_listening_port: 9000 } - - { role: infra-role-beacon-node, - beacon_node_network: 'testnet1', - beacon_node_build_flavour: 'rlpx', - beacon_node_total_nodes: 10, - beacon_node_running_nodes: 2, - beacon_node_discovery_port: 9100, - beacon_node_listening_port: 9100 } + tasks: + - include_role: + name: infra-role-beacon-node + with_sequence: count=2 + vars: + beacon_node_network: 'testnet0' + beacon_node_public_tcp_port: '{{ 9000 + item|int }}' + beacon_node_public_udp_port: '{{ 9000 + item|int }}' + beacon_node_cont_name: 'beacon-node-{{ beacon_node_build_flavour }}-{{ beacon_node_network}}-{{ item }}' + + - include_role: + name: infra-role-beacon-node + with_sequence: count=2 + vars: + beacon_node_network: 'testnet1' + beacon_node_public_tcp_port: '{{ 9100 + item|int }}' + beacon_node_public_udp_port: '{{ 9100 + item|int }}' + beacon_node_cont_name: 'beacon-node-{{ beacon_node_build_flavour }}-{{ beacon_node_network}}-{{ item }}'