termux_packages
Tags: system, packages, termux
Secrets needed: No
Runs on: termux_hosts group only (the raw Termux/Android layer on the phone)
Package and sshd management for Termux, which has no root, no systemd, no Homebrew and bionic libc.
What It Does
pkg update -y(retried 3×), thenpkg install -ythetermux_pkgslistnpm install -gthetermux_npm_globallist (the pi coding agent)- Deploys
~/.termux/boot/start-sshd(termux-wake-lock+sshd) for Termux:Boot - Starts
sshdif it isn't running - Schedules the same script as a persisted periodic job via
termux-job-scheduler(job id 1), so sshd comes back after Android kills Termux
Configuration
roles/termux_packages/defaults/main.yml:
termux_pkgs— openssh, git, python, nodejs, fish, vim, nano, termux-api, curl, unzip, plusfileande2fsprogs(Ansible's stat/copy modules need them)termux_npm_global—@earendil-works/pi-coding-agenttermux_keepalive_period_ms—1800000(30 min; Android's floor is 15)
Notes
- Requires the Termux:Boot and Termux:API companion apps, installed separately (F-Droid/GitHub)
- Claude Code, Codex etc. ship no android-arm64 binary — they live on the
mumbaiphone VM instead - Connection quirks (remote tmp, scp, bash as shell executable) are pinned in
host_vars/termux.yml