consensys.geth

Ansible Role: geth

Description

This Ansible role installs, configures, and runs Geth.

Table of Contents

Supported Platforms

* Debian
* Ubuntu
* Red Hat (CentOS/Fedora)
* Amazon

Dependencies

  • Go version 1.13.x or higher

Role Variables:

All variables that can be changed are found in the defaults/main.yml file. Generally, these variables help set configuration options.

Name Default Value Description
geth_version unset The version of Geth to install and run. All available versions can be found on the Geth releases page
geth_git_hash unset The commit hash of Geth to install and run. This must match geth_version. For available versions, see the Geth releases page
geth_user geth The user for Geth
geth_group geth The group for Geth
geth_download_url https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-{{geth_version}}-{{geth_git_hash}}.tar.gz The URL for downloading the tar.gz file. You can change this if you want to get Geth from a specific location, like an internal repository.
geth_install_dir /opt/geth The directory where Geth will be installed
geth_config_dir /etc/geth The directory for default configuration
geth_node_private_key_file "" The path for the node's private key, if provided. This should include the file name and path, e.g., /home/me/me_node/myPrivateKey. If not provided, Geth will create one automatically.
geth_data_dir /opt/geth/data The directory for data
geth_log_dir /var/log/geth The directory for logs
geth_managed_service true Enables a systemd service for Geth
geth_systemd_dir /etc/systemd/system/ The default directory for systemd services
geth_systemd_state restarted The default state for the systemd service
geth_identity GethNode The identity of the node
geth_host_ip "" The host IP that Geth uses for the P2P network. This specifies where P2P listens
geth_discovery_public_ip true Indicates if the node should use the public IP of the host in cloud environments (AWS, Azure, GCP). Private IP is faster and more secure for internal traffic.
geth_network_id 1337 The ID of the network
geth_sync_mode snap The synchronization mode. The other option is 'fast'.
geth_log_verbosity 3 The level of logging. Other levels are 0=silent, 1=error, 2=warn, 3=info, 4=debug, 5=detail
geth_metrics_enabled true Enables Prometheus metrics collection
geth_metrics_host 0.0.0.0 The interface where the pprof HTTP server listens
geth_metrics_port 9545 The port where the pprof HTTP server listens
geth_p2p_port 30303 The P2P listening ports (both UDP and TCP). Ports must be exposed properly
geth_http_enabled true Enables the HTTP JSON-RPC service
geth_http_host 127.0.0.1 Specifies where the HTTP JSON-RPC listens
geth_http_port 8545 Specifies the port for the HTTP JSON-RPC service
geth_http_api ["admin","db","eth","debug","miner","net","shh","txpool","personal","web3"] List of APIs to enable on the HTTP JSON-RPC channel. If used, geth_rpc_http_enabled must also be enabled
geth_http_cors_origins ["all"] The domains from which cross-origin requests are accepted
geth_http_virtual_hosts ["all"] The virtual hostnames from which requests are accepted
geth_ws_enabled true Enables the WebSockets service
geth_ws_api ["admin","db","eth","debug","miner","net","shh","txpool","personal","web3"] List of APIs to enable for the WebSocket service. If used, geth_rpc_ws_enabled must also be enabled
geth_ws_host 0.0.0.0 The host on which WebSockets listens
geth_ws_port 8546 The port for the WebSockets JSON-RPC service (TCP). Port must be exposed properly
geth_ws_origins ["all"] List of domains allowed for WebSocket requests
geth_user_cmdline_args "" Command line arguments provided by the user
geth_env_opts [] Settings passed to Geth through environment variables
geth_unlock 0 List of accounts to unlock, separated by commas
geth_account_password_file "" File containing passwords for non-interactive input

License

Apache License

Author Information

Consensys, 2022

Informazioni sul progetto

Geth is an ethereum client

Installa
ansible-galaxy install consensys.geth
Licenza
Unknown
Download
4.7k
Proprietario
Consensys is the software engineering leader of the blockchain space. Our full-stack Ethereum products help developers build next-generation networks.