Skip to content

Commit 13a12a2

Browse files
committed
Add support for bootstrap_directory variable
1 parent d8b0218 commit 13a12a2

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

cmd/bootstrap/transit/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,10 @@ Example usage:
101101
```shell
102102
ansible-playbook -i inventories/mainnet/mainnet26.yml/ vote_on_root_block.yml \
103103
-e "boot_tools_tar=https://storage.googleapis.com/flow-genesis-bootstrap/boot-tools.tar" \
104-
-e "output_directory=/var/flow/bootstrap" \
105-
-e "network_version_token=mainnet-26" \
104+
-e "bootstrap_directory=/var/flow/bootstrap"
106105
-e "genesis_bucket=flow-genesis-bootstrap" \
107-
-e force_repull_transit=true
106+
-e "network_version_token=mainnet-26" \
107+
-e "output_directory=/var/flow/bootstrap" \
108+
-e force_repull_transit=true \
108109
```
109110

cmd/bootstrap/transit/vote_on_root_block.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55
gather_facts: false
66

77
vars:
8+
89
# Required inputs (no defaults)
910
# http(s) URL or absolute local path to boot-tools.tar (on controller)
1011
boot_tools_tar: "{{ boot_tools_tar }}"
12+
bootstrap_directory: "{{ bootstrap_directory }}"
1113
genesis_bucket: "{{ genesis_bucket }}"
1214
network_version_token: "{{ network_version_token }}"
1315
output_directory: "{{ output_directory }}"
@@ -39,6 +41,13 @@
3941
fail_msg: "output_directory must be an absolute path (e.g., /opt/flow/transit-bin)."
4042
tags: [validate]
4143

44+
- name: Validate bootstrap_directory is an absolute path
45+
assert:
46+
that:
47+
- bootstrap_directory is match('^/')
48+
fail_msg: "bootstrap_directory must be an absolute path (e.g., /opt/flow/transit-bin)."
49+
tags: [validate]
50+
4251
- name: Validate boot_tools_tar looks like a URL or an absolute file path
4352
vars:
4453
_looks_like_path: "{{ (not _is_url) and (boot_tools_tar is match('^/')) }}"
@@ -142,7 +151,7 @@
142151
- -t
143152
- "{{ network_version_token }}"
144153
- -b
145-
- /var/flow/bootstrap
154+
- "{{ bootstrap_directory }}"
146155
- -o
147156
- "{{ output_directory }}"
148157
- -g
@@ -162,7 +171,7 @@
162171
- "{{ transit_path }}"
163172
- generate-root-block-vote
164173
- -b
165-
- /var/flow/bootstrap
174+
- "{{ bootstrap_directory }}"
166175
- -o
167176
- "{{ output_directory }}"
168177
register: gen_vote_result
@@ -182,7 +191,7 @@
182191
- -t
183192
- "{{ network_version_token }}"
184193
- -b
185-
- /var/flow/bootstrap
194+
- "{{ bootstrap_directory }}"
186195
- -d
187196
- "{{ output_directory }}"
188197
- -g

0 commit comments

Comments
 (0)