-
Notifications
You must be signed in to change notification settings - Fork 15
/
horcrux.yml
46 lines (43 loc) · 1.13 KB
/
horcrux.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
---
- name: Define hosts
hosts: localhost
gather_facts: false
vars_files:
- '{{ var_file }}'
tasks:
- name: handle mainnet signers
when: testnet is not defined
block:
- name: add single signer
when: shares == 1
add_host:
hostname: signer1
group: signers
- name: add all signers
when: shares > 1
block:
- name: remove testnet_signer1 from the list
set_fact:
filtered_list: "{{ groups['all'] | difference(['testnet_signer1']) }}"
- name: create host group
add_host:
hostname: '{{ item }}'
group: signers
loop: '{{ filtered_list }}'
- name: handle testnet signers
when: testnet is defined and testnet|bool
add_host:
hostname: testnet_signer1
group: signers
- name: Install Horcrux
hosts: signers
become: true
gather_facts: false
vars_files:
- '{{ var_file }}'
roles:
- define_variables
# - horcrux_install
- horcrux_configure
- horcrux_create_shares
- horcrux_restart