2020-11-25 14:58:44 +00:00
|
|
|
---
|
2021-04-09 06:18:59 +00:00
|
|
|
- name: 'Verify Ansible versions'
|
|
|
|
hosts: all
|
|
|
|
tags: always
|
2021-05-10 13:29:38 +00:00
|
|
|
become: false
|
|
|
|
run_once: true
|
2021-04-09 06:18:59 +00:00
|
|
|
gather_facts: false
|
2020-11-25 14:58:44 +00:00
|
|
|
tasks:
|
2021-04-09 06:18:59 +00:00
|
|
|
- local_action: command ./versioncheck.py
|
|
|
|
changed_when: false
|
2020-11-25 14:58:44 +00:00
|
|
|
|
2021-06-22 09:49:48 +00:00
|
|
|
- name: Configure network mainnet bootnodes
|
2021-05-19 10:04:12 +00:00
|
|
|
become: true
|
2022-06-14 09:40:18 +00:00
|
|
|
serial: '{{ serial|default(1) }}'
|
2021-06-22 09:49:48 +00:00
|
|
|
hosts: 'nimbus-mainnet-small'
|
2021-10-04 10:07:32 +00:00
|
|
|
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)}}'
|
2021-05-19 10:04:12 +00:00
|
|
|
roles:
|
2021-10-05 10:08:14 +00:00
|
|
|
- { role: swap-file, tags: [ swap-file ] }
|
2021-10-05 15:48:01 +00:00
|
|
|
- { role: redirect-ports, tags: [ redirect-ports ] }
|
2021-12-02 12:10:06 +00:00
|
|
|
- { role: get-geth-api-urls, tags: [ get-geth-api-urls ] }
|
2021-10-05 15:48:01 +00:00
|
|
|
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
|
2021-10-04 10:07:32 +00:00
|
|
|
|
|
|
|
- name: Deploy mainnet linux beacon nodes
|
|
|
|
become: true
|
2022-06-14 09:40:18 +00:00
|
|
|
serial: '{{ serial|default(1) }}'
|
2021-10-04 10:07:32 +00:00
|
|
|
hosts: nimbus-mainnet-metal
|
|
|
|
roles:
|
2021-10-04 11:42:33 +00:00
|
|
|
- { role: redirect-ports, tags: [ redirect-ports ] }
|
2021-12-02 12:10:06 +00:00
|
|
|
- { role: get-geth-api-urls, tags: [ get-geth-api-urls ] }
|
2021-10-04 10:07:32 +00:00
|
|
|
tasks:
|
|
|
|
- include_role: name=infra-role-beacon-node-linux
|
2021-10-05 15:48:01 +00:00
|
|
|
tags: [ beacon-node, infra-role-beacon-node-linux ]
|
|
|
|
with_items: '{{ nodes_layout[hostname] }}'
|
2021-10-04 10:07:32 +00:00
|
|
|
loop_control:
|
|
|
|
loop_var: node
|
|
|
|
index_var: port_offset
|
2022-02-28 16:32:01 +00:00
|
|
|
|
|
|
|
- name: Configure periodic puging of nodes DBs
|
|
|
|
become: true
|
2022-06-14 09:40:18 +00:00
|
|
|
serial: '{{ serial|default(1) }}'
|
2022-02-28 16:32:01 +00:00
|
|
|
hosts: nimbus-mainnet-metal
|
|
|
|
tasks:
|
|
|
|
- include_role: name=nimbus-db-purge
|
|
|
|
when: node.get("db_purge", None)
|
|
|
|
with_items: '{{ nodes_layout[hostname] }}'
|
|
|
|
loop_control:
|
|
|
|
loop_var: node
|
|
|
|
index_var: port_offset
|