69 lines
2.2 KiB
YAML
69 lines
2.2 KiB
YAML
---
|
|
- name: Pre-playbook checks
|
|
hosts: localhost
|
|
tasks:
|
|
- name: 'Verify Ansible version is 2.8 or newer'
|
|
assert:
|
|
that: 'ansible_version.full is version_compare("2.8", ">=")'
|
|
msg: 'Your Ansible version is lower than 2.8. Upgrade it.'
|
|
|
|
- name: Configure Nimbus master
|
|
hosts:
|
|
- nimbus-master
|
|
roles:
|
|
- { role: origin-certs, tags: origin-certs }
|
|
#- { role: nimbus-stats, tags: nimbus-stats }
|
|
|
|
- name: Configure Nimbus cluster
|
|
hosts:
|
|
- nimbus-master
|
|
- nimbus-slaves[0:4]
|
|
tags: beacon-node
|
|
roles:
|
|
- { role: swap-file, tags: swap-file }
|
|
tasks:
|
|
- include_role:
|
|
name: infra-role-beacon-node
|
|
tags: beacon-node
|
|
with_sequence: count=1
|
|
vars:
|
|
beacon_node_network: 'testnet0'
|
|
beacon_node_rpc_port: '{{ 10000 - 1 + item|int }}'
|
|
beacon_node_metrics_port : '{{ 9200 - 1 + item|int }}'
|
|
beacon_node_listening_port: '{{ 9000 - 1 + item|int }}'
|
|
beacon_node_discovery_port: '{{ 9000 - 1 + item|int }}'
|
|
beacon_node_cont_name: 'beacon-node-{{ beacon_node_network}}-{{ item }}'
|
|
|
|
- include_role:
|
|
name: infra-role-beacon-node
|
|
tags: beacon-node
|
|
with_sequence: count=1
|
|
vars:
|
|
beacon_node_network: 'testnet1'
|
|
beacon_node_rpc_port: '{{ 11000 - 1 + item|int }}'
|
|
beacon_node_metrics_port : '{{ 9300 - 1 + item|int }}'
|
|
beacon_node_listening_port: '{{ 9100 - 1 + item|int }}'
|
|
beacon_node_discovery_port: '{{ 9100 - 1 + item|int }}'
|
|
beacon_node_cont_name: 'beacon-node-{{ beacon_node_network}}-{{ item }}'
|
|
|
|
- name: Configure shared testnet
|
|
hosts:
|
|
- nimbus-slaves[5:8]
|
|
tags: beacon-node
|
|
roles:
|
|
- { role: swap-file, tags: swap-file }
|
|
tasks:
|
|
- include_role:
|
|
name: infra-role-beacon-node
|
|
tags: beacon-node
|
|
with_sequence: count=1
|
|
vars:
|
|
beacon_node_network: 'testnet2'
|
|
beacon_node_rpc_port: '{{ 11000 - 1 + item|int }}'
|
|
beacon_node_metrics_port : '{{ 9300 - 1 + item|int }}'
|
|
beacon_node_listening_port: '{{ 9100 - 1 + item|int }}'
|
|
beacon_node_discovery_port: '{{ 9100 - 1 + item|int }}'
|
|
beacon_node_cont_name: 'beacon-node-{{ beacon_node_network}}-{{ item }}'
|
|
beacon_node_shared_testnet_cron: true
|
|
|