-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
301 additions
and
175 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Try running Bacalhau first, to see what version it is. | ||
- name: Check bacalhau version | ||
ansible.builtin.command: /usr/local/bin/bacalhau version | ||
register: existing_bacalhau_version | ||
ignore_errors: true | ||
changed_when: false | ||
no_log: true | ||
check_mode: false | ||
|
||
- name: Print installed kubo version | ||
ansible.builtin.debug: | ||
msg: "Installed bacalhau version: {{ existing_bacalhau_version.stdout.split('Server Version: ')[1] }} vs {{ bacalhau_version }}" | ||
when: existing_kubo_version.stdout != '' | ||
|
||
# Compare the latest version of bacalhau with the version that is already installed, if any. | ||
- name: Install or update bacalhau | ||
when: | ||
"(existing_bacalhau_version.stdout == '') or (existing_bacalhau_version.stdout.split('Server Version: ')[1] != bacalhau_version)" | ||
block: | ||
- name: Download Bacalhau binary | ||
become: true | ||
ansible.builtin.unarchive: | ||
src: "https://github.com/bacalhau-project/bacalhau/releases/download/{{ bacalhau_version }}/bacalhau_{{ bacalhau_version }}_linux_amd64.tar.gz" | ||
dest: /usr/local/bin | ||
# Letting when condition control if needs installing/upgrading | ||
# creates: /usr/local/bin/bacalhau | ||
remote_src: "true" | ||
register: bacalhau_unarchive | ||
retries: 5 | ||
delay: 3 | ||
until: bacalhau_unarchive is succeeded | ||
|
||
- name: Install the Bacalhau systemd unit | ||
become: true | ||
ansible.builtin.template: | ||
src: "files/{{ bacalhau_node_type }}.service" | ||
dest: /etc/systemd/system | ||
notify: | ||
- Restart Bacalhau | ||
|
||
- name: Ensure Bacalhau is running | ||
become: true | ||
ansible.builtin.service: | ||
name: "{{ bacalhau_node_type }}" | ||
state: started | ||
enabled: true |
File renamed without changes.
Oops, something went wrong.