The Sia Ansible role installs Sia on a node and automates its initial provisioning steps.
- Unattended install
- This role allows you to provision a Sia node from start to finish completely unattended. No more waiting hours for the blockchain to sync or the wallet to unlock before you can proceed to the next step of installation.
- Service installation
- Will install Sia as a systemd service.
- Idempotent
- This role is idempotent. You can run it against the same server multiple times and it will not change the server's state unless necessary.
- Simple upgrade
- With this role, upgrading your Sia version is simply a matter of changing the version variable.
Available variables are listed below, along with default values (see defaults/main.yml):
The version of Sia to install:
sia_version: 1.3.7The location to install Sia:
sia_dir: "/opt/{{ sia_package }}"The convenience symlink that will always point to the latest version of Sia (e.g. /opt/sia/siac wallet):
sia_symlink: "/opt/sia"The location to store Sia data files (blockchain files, encrypted wallet files, and other Sia metadata):
sia_data_dir: "/opt/sia-data"Specifies whether or not to use the bootstrap method to sync the Sia blockchain:
sia_bootstrap_blockchain: FalseUsername and group to use for Sia service:
sia_user: sia
sia_group: "{{ sia_user }}"Sia modules to load (see the --modules parameter of siad):
sia_modules: cgtwrhPath (on the control node, localhost) to a file to store newly created seed passphrases. If specified, and ansible-role-sia provisions a node with an unitialized wallet, Ansible will initialize the wallet with a random Sia seed and save the passphrase to this file. If the node already has an initialized wallet, this variable is ignored.
sia_seed_path: nullThe 29-word Sia passphrase to use to initialize the node's Sia wallet. If the node already has an initialized wallet, this variable is ignored.
sia_seed: nullThe passphrase to decrypt the node's wallet:
sia_wallet_password: "{{ sia_seed }}"None
- hosts: all
roles:
- { role: mtlynch.sia }To run the example playbook, example.yml (above), run the following commands:
ansible-galaxy install mtlynch.sia
ansible-playbook example.ymlSee this blog post for additional examples.
MIT
This role was created in 2018 by Michael Lynch.