The odd architecture in the fleet was my laptop

Cross-platform deployment usually means the servers differ; here the servers were identical and the build host was the exception.

Infra

wireless-tools is a Go repository of small EPC troubleshooting binaries — one directory per tool under cmd/, with the Makefile deriving the list instead of carrying it:

TOOLS=$(notdir $(wildcard ./cmd/*))

install-on-tankers:
    ansible-playbook -i inventory/hosts-prod install.yml

They get installed on tankers — the jump hosts that sit inside each wireless site, and the only place from which you can tcpdump an S11 interface or read an EPC log. Sixteen of them in production across four sites (seven, six, two, one) and exactly one in dev. That is the whole fleet (seventeen hosts, two inventory files), and it is uniform: Ubuntu focal, x86, everywhere.

Why the build happens in a container

The tankers are focal, so the binaries have to be built against focal. install.yml therefore has two plays, and the first one runs on localhost:

- name: Build the Docker image
  community.docker.docker_image:
    build:
      path: ./docker
      platform: linux/amd64
    name: ubuntu-focal-golang

- name: Compile the tools
  ansible.builtin.command: |
    docker run --rm -t --volume '.:/src' --volume '{{ build_dir }}:/src/_build' \
      --workdir /src ubuntu-focal-golang make

The second play copies {{ common_tools + extra_tools }} out of {{ build_dir }} (./_build/focal) into /usr/local/bin on every host in epc_tankers, mode 0755, with become: true. Twelve names in common_tools; extra_tools is an empty list, there so one host group can carry extras later, and none ever has.

The two-word fix

platform: linux/amd64 is the whole of it, in both image builds. Without it, Docker on an Apple-silicon laptop builds an arm64 ubuntu-focal-golang, go build inside it emits arm64 binaries, and Ansible then copies them cheerfully onto sixteen x86 hosts. The failure surfaces at the far end, on a tanker, as an exec format error, a long way from the build that caused it and not at build time, where it belongs. The same commit also dropped become: true from the localhost play (building as root on your own machine is a leftover, never a requirement).

The adjacent wrinkle is the second image. Focal's mergecap refuses pcaps captured on jammy:

mergecap: The file "dra2-20240525_11_19.pcap" contains record data that mergecap
doesn't support. (pcap: network type 276 unknown or unsupported)

So the playbook builds a newer mergecap from Dockerfile.mergecap and copies the binary out of the container into _build/ — a backport someone on the team had already done, which the build simply inherits. Both image tasks needed the platform pin; fixing one of two leaves half a toolchain (correct tools, unrunnable mergecap).

Removing is a separate playbook

Ansible copies files; nothing tells it that a file it copied last quarter should now be gone. Renaming gtpv2-csr-rejection-info to gtpv2-csr-info leaves the old binary on sixteen hosts forever, and an engineer in an incident will eventually run the stale one. So there is cleanup.yml, with a with_items list of absolute paths and a comment next to each saying what replaced it. It is edited when it is needed and committed with the adjustment, which is honest about what it is — a hand-maintained list (eleven lines, one entry), never reconciliation.

Two other defaults earn their place. ansible.cfg points the default inventory at ./inventory/hosts-dev, so a bare ansible-playbook install.yml touches the one dev tanker (-i inventory/hosts-prod has to be typed on purpose). pipelining = True sits in the same file and saves an SSH round trip per task. And --ask-become-pass came off the three Makefile targets in June 2025, in the commit that added diameter-analysis to the list — an interactive prompt in the middle of a fleet-wide install is a reason to skip the install.

What it cost

Most of the commits here touch inventory, never the automation: LBO proxy pairs for Partner B as they came up (December 2024), a second US pair seven months later, the expanded Partner A components at site-c (May 2025). The playbook itself has barely changed since the platform pin, which is not an accident — it does two things.

The surprise is where heterogeneity actually lives. I went looking for it in the fleet, which is where the deployment literature puts it, and found sixteen identical machines (same OS, same architecture, same package set). The one architecture that varied was the machine I was typing on, and nothing in the pipeline was watching that end — build hosts are not inventory, so nothing declares what they are.