Subnet Faucet
In this section, we will learn how to use the ash.avalanche.faucet role to deploy an Avalanche Faucet for an EVM blockchain.
For this tutorial, we will use the local inventory provided by the Ansible Avalanche Getting Started repository. See Create a Local Test Network for details.
We should also have created a Subnet and a blockchain, see Subnet Creation for details.
Always make sure you have the latest version of the collection installed. See Installation and upgrade.
Requirements
The ash.avalanche.faucet role uses Docker and the ash.avalanche.install_faucet_docker playbook installs Docker through the geerlingguy.docker.
We can make this role available locally with:
ansible-galaxy install -r ansible_collections/ash/avalanche/requirements.yml
Configure the faucet
The Avalanche Faucet will be installed as a Docker Compose service on the nodes of the faucet Ansible group. In Ansible Avalanche Getting Started, it is the frontend node by default. You can change this by editing the hosts file.
Set the blockchain ID in faucet.yml (the group_vars file associated with our hosts' group):
faucet_blockchain_id: 2dEmExGjJT6MouJRr1PqV4PSQEbScDAjKuPtT6pgqYR5xdUuac
The blockchain ID (2dEmExGjJT6MouJRr1PqV4PSQEbScDAjKuPtT6pgqYR5xdUuac in our case) should be the one created in the Subnet Creation tutorial.
If you went through all the tutorials with the local inventory and the default variables, you should be good to go! Otherwise, check out the other variables at ash.avalanche.faucet.
Install the faucet
Running the ash.avalanche.install_faucet_docker will install Docker and the docker-compose service:
ansible-playbook ash.avalanche.install_faucet_docker -i inventories/local
Generate the Faucet URL and open it in your browser:
echo "http://$(terraform -chdir=terraform/multipass output -raw frontend_ip):8000"
http://10.117.207.108:8000

The ash.avalanche.faucet role is not yet compatible with secured HTTP API endpoints.