raspi-config's do_hostname rewrites the 127.0.1.1 line with sed "s/127\.0\.1\.1.*$CURRENT_HOSTNAME/127.0.1.1\t$NEW_HOSTNAME/" which only matches if that line already holds the *old* hostname. Ours still said "raspberrypi", so the substitution has been silently doing nothing and the box could not resolve its own hostname. Set the line explicitly instead, after the hostname is re-read, so a rename and this update happen in the same run. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
pi_standard_setup
Baseline provisioning applied to every Pi: apt update/upgrade, detects the
Pi model, adds a root SSH key, disables the SSH locale-forwarding warning,
optionally configures wifi and the hostname, and rotates the default
pi/raspberry credentials via the keepass lookup plugin.
Key vars: pi_standard_setup_wifi_ssid, pi_standard_setup_new_hostname,
pi_standard_setup_timezone, pi_standard_setup_wifi_country,
ansible_ssh_pass (the OS-default password, used only to reach a
freshly-flashed Pi for the first time before its password is rotated)