Repository navigation
fix: repair apt state before security updates in xqueue playbook - #389
Merged
Merged
Conversation
Run dpkg --configure -a, apt-get -f install and apt-get update as a pre_task so unattended-upgrade in the security role doesn't fail on an interrupted dpkg run or broken packages. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
amits-2u
approved these changes
Oct 6, 2026
naincy128
added a commit
that referenced
this pull request
Oct 7, 2026
naincy128
added a commit
that referenced
this pull request
Oct 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR resolves deployment pipeline hangs and failures on
TASK [security : Take security updates during ansible runs]caused by APT lock contention, interactive prompts, andunattended-upgradefailures during EC2 provisioning.Problem
When provisioning new or existing EC2 instances during GoCD pipeline runs (e.g.
stage-xqueue), thesecurityrole'sTake security updates during ansible runstask executesunattended-upgrade --dry-runfollowed byunattended-upgrade.During runs against instances with pending package upgrades or active background boot services (
unattended-upgrades.service,apt-daily.timer):unattended-upgradefails or encounters non-zero exit codes during initial package resolution.retries: 10), with each attempt taking 10–12 minutes to resolve dependencies and download packages.exited: 2).Changes
playbooks/roles/security/tasks/security-ubuntu.yml(and related security tasks) to ensure non-interactive execution and clean package state handling before running security upgrades.