🛡️ Trust Wallet is a most trusted & secure non-custodial crypto wallet.
The Trust Wallet's Ansible Galaxy collection of roles to configure blockchain nodes.
NOTE: These roles set up non-validator nodes. Please check the requirements and an additional configuration at the chain's documentation if the validator or other node type is required.
List of the collection roles:
- trustwallet.blockchain.blockbook - Blockbook supported blockchains
- trustwallet.blockchain.cosmos - All Cosmos-SDK based blockchains
- trustwallet.blockchain.ethereum - Ethereum blockchain with Geth
- trustwallet.blockchain.nano - Nano blockchain
- trustwallet.blockchain.near - NEAR blockchain
- trustwallet.blockchain.polygon - Polygon blockchain
- trustwallet.blockchain.tron - TRON blockchain
- ...more are coming
Install the collection using the following command:
ansible-galaxy collection install trustwallet.blockchainExample setting up Ethereum Full Node with the collection role:
# playbook.yml
---
- hosts: "all"
  gather_facts: true
  become: true
  
  pre_tasks:
    - name: "Install apt packages"
      ansible.builtin.apt:
        update_cache: true
        cache_valid_time: 86400
        pkg: python3
  
  roles:
    - role: trustwallet.blockchain.ethereum
      data_dir: /mnt/data
      geth_config:
        Eth:
          SyncMode: fullAnsible Roles consists of few phases (not every role contains all phase though):
- load variables
- install binaries
- init blockchain node
- set configuration
- sync chain data from public backup
The best way to submit feedback and report bugs is to open a GitHub issue.
Development/integration of the roles are configured with Molecule and EC2 driver.
It's recommended to develop inside Virtual environment
virtualenv -p python3 venv
source venv/bin/activate
pip install -r requirements.txt
ansible-galaxy install -r requirements.ymlProvide AWS credentials to allow Molecule provision ephemeral EC2 instance.
export AWS_PROFILE=
# or 
export AWS_ACCESS_KEY_ID=
export AWS_SECRET_KEY=Also provide the target region, image AMI and VPC subnet identifier
export AWS_REGION=us-east-1
export MOLECULE_VPC_SUBNET_ID=subnet-...
export MOLECULE_IMAGE=ami-... # ubuntu
export MOLECULE_IMAGE_DEBIAN=ami-... # debian for blockbook For each role there is a /molecule/<role> directory with configuration files.
Execute full integration scenario which includes steps to install all dependencies, create EC2 instance, execute role, test, cleanup and finally destroy EC2 instance run the following command (e.g. ethereum role).
molecule test -s ethereumOr launch instance and execute a role
molecule converge -s ethereumAnd verify
molecule verify -s ethereumJump to the node
molecule login -s ethereumFinally, cleanup and destroy
molecule destroy -s ethereumTo build the local version of the Ansible Galaxy collection:
ansible-galaxy collection build --forceThe trustwallet-blockchain-x.x.x.tar.gz file will appear at the root of the project.
It can be installed for local testing by executing the following command:
ansible-galaxy collection install trustwallet-blockchain-0.x.x.tar.gz --force- Trust Wallet crypto wallet project page
- Trust Wallet Collection Ansible Galaxy page
- Molecule Ansible roles testing framework
- Testinfra unit tests in Python to test actual state of the server configured by Ansible/Molecule
Ansible Collection trustwallet.blockchain is available under the MIT license.