fix(ansible): make apt itself wait for the dpkg lock #68
Loading…
Reference in a new issue
No description provided.
Delete branch "jfraeys/fix/apt-dpkg-lock-timeout"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Staging run 471:
backups : Install resticfailed 4s after starting withCould not get lock /var/lib/dpkg/lock-frontend ... (unattended-upgr)despite the play'slock_timeout: 300. That module option only covers python-apt's cache lock; the apt-get it spawns fails immediately. A pre-task now drops/etc/apt/apt.conf.d/99dpkg-lock-timeout(DPkg::Lock::Timeout "600") so every apt-get in the play waits, in services, web, hardening and ci-ephemeral.Verified in a Debian 12 container with a real fcntl lock holder: without the file apt-get fails at once (rc 100, same message); with it, it waited 8s for the lock and succeeded. ansible-lint, yamllint and syntax-check pass for all four playbooks. The file persists on hosts (harmless in steady state). The ci-ephemeral change reaches the provisioner after a role redeploy. 🤖 Generated with Claude Code