infra-nimbus/ansible/mainnet.yml

43 lines
1.4 KiB
YAML

---
- name: 'Verify Ansible versions'
hosts: all
tags: always
become: false
run_once: true
gather_facts: false
tasks:
- local_action: command ./versioncheck.py
changed_when: false
- name: Configure network mainnet bootnodes
become: true
hosts: 'nimbus-mainnet-small'
vars:
# WARNING: Since these are Eth 2 bootnodes we need to keep the keys and IPs unchanged.
beacon_node_netkey: '{{lookup("bitwarden", "nimbus/netkey", field=hostname)}}'
roles:
- { role: swap-file, tags: [ swap-file ] }
- { role: redirect-ports, tags: [ redirect-ports ] }
- { role: get-geth-web3-urls, tags: [ get-geth-web3-urls ] }
tasks:
- include_role: name=infra-role-beacon-node-linux
tags: [ beacon-node, infra-role-beacon-node-linux ]
with_items: '{{ nodes_layout[hostname] }}'
loop_control:
loop_var: node
index_var: port_offset
- name: Deploy mainnet linux beacon nodes
become: true
hosts: nimbus-mainnet-metal
roles:
- { role: redirect-ports, tags: [ redirect-ports ] }
- { role: get-geth-web3-urls, tags: [ get-geth-web3-urls ] }
tasks:
- include_role: name=infra-role-beacon-node-linux
tags: [ beacon-node, infra-role-beacon-node-linux ]
with_items: '{{ nodes_layout[hostname] }}'
loop_control:
loop_var: node
index_var: port_offset