aedcb3c48aab4f6063d123793f0b8303be964de8
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018STDcc5BaYxPMNA9S8Wycs
ansible-role-monero
Deploys a Monero node (monerod) and a P2Pool node to Kubernetes, in the
monero namespace. Miners point xmrig at the P2Pool service on port 3333.
Role Variables
Required, from Vault:
monerod_user,monerod_password: monerod's RPC login. Stored in themonerod-rpcSecret and passed to both containers through an environment variable, so it doesn't show in the Deployment specs.monero_p2pool_wallet_address: the address P2Pool pays out to.
Optional:
monero_p2pool_chain(defaultnano):main,miniornano. Match it to your total hashrate; see the note indefaults/main.yml. Switching chains starts from zero shares on the new chain, and shares on the old one stop earning once they leave its PPLNS window.monero_p2pool_addpeers(default[]): extra P2Pool peers ashost:port. They must be on the same chain.monero_p2pool_stats_host(defaultwww.eom.dev): website host that gets the public/p2pool/stats.jsonpath. Use""to keep stats internal.monero_p2pool_stats_ingress_class(defaultnginx),monero_p2pool_stats_image(defaultpython:3.13-alpine).
Public stats
P2Pool runs with --data-api /api --local-api. Those files include miner IP
addresses, so they are never served. A stats sidecar
(files/p2pool_stats.py, standard library only) copies an allowlist of numeric
fields into one JSON document:
{"sidechain": "nano",
"node": {"hashrate_15m", "hashrate_1h", "hashrate_24h", "miners",
"shares_found", "shares_failed", "current_effort",
"average_effort", "reward_share_percent",
"last_share_found_time", "updated_at", "stale"},
"pool": {"hashrate", "miners", "difficulty", "height", "blocks_found",
"last_block_found_time", "pplns_window", "updated_at", "stale"},
"network": {"hashrate", "difficulty", "height", "reward_xmr",
"updated_at", "stale"}}
node is this P2Pool instance (everyone mining through it); pool is the
whole sidechain. Sections are null until P2Pool writes them, and the
endpoint answers 503 until node exists. Run the sidecar's tests with
python3 -m unittest discover -s tests.
Example Playbook
- hosts: alpha-control-plane
become: true
vars_files:
- ../secrets.yaml
roles:
- role: ericomeehan.monero
License
MIT-0