Skip to content

Comments

fix: 🐛 handle 'all' in outbound ports loop in rule rule_4.1.5 and apt/dpkg lock#329

Open
tmeckel wants to merge 4 commits intoansible-lockdown:develfrom
tmeckel:fix/4-1-5-all
Open

fix: 🐛 handle 'all' in outbound ports loop in rule rule_4.1.5 and apt/dpkg lock#329
tmeckel wants to merge 4 commits intoansible-lockdown:develfrom
tmeckel:fix/4-1-5-all

Conversation

@tmeckel
Copy link
Contributor

@tmeckel tmeckel commented Feb 11, 2026

Please ensure that you have understood contributing guide
Ensure all commits are signed-by and gpg signed

Overall Review of Changes:

  • Changed tasks/section_4/cis_4.1.x.yml so the loop in the 4.1.5 "Custom ports" task uses an empty list when ubtu22cis_ufw_allow_out_ports == 'all', instead of looping over the raw value.
  • Added a configurable ubtu22cis_apt_lock_timeout (default 180s) and applied it to the CIS 5.3.1 package installs to wait for apt/dpkg locks instead of failing.

Issue Fixes:
Closes: #328
Closes: #330

Enhancements:
N/A

How has this been tested?:
Local image builder

@tmeckel tmeckel changed the title fix: 🐛 handle 'all' in outbound ports loop in rule rule_4.1.5 fix: 🐛 handle 'all' in outbound ports loop in rule rule_4.1.5 and apt/dpkg lock Feb 12, 2026
Signed-off-by: Thomas Meckel <tmeckel@users.noreply.github.com>
Add ubtu22cis_apt_lock_timeout variable to configure wait time for apt/dpkg frontend lock to clear before failing package tasks. Defaults to 180 seconds.

Signed-off-by: Thomas Meckel <tmeckel@users.noreply.github.com>
Apply the `ubtu22cis_apt_lock_timeout` variable to all libpam package installation tasks to prevent potential lock contention during concurrent package operations.

Signed-off-by: Thomas Meckel <tmeckel@users.noreply.github.com>
The ansible.builtin.package module does not support the lock_timeout parameter which is specific to apt. Switch to ansible.builtin.apt to properly utilize the apt lock timeout configuration added for PAM package installations.
@uk-bolly
Copy link
Member

hi @tmeckel

Thank you for the PR, unfortunately they are not passing DCO. While the commits are GPG signed they are not signed-off-by.
If you could possibly sign off all the commits we can review the PR.

Many thanks

uk-bolly

@uk-bolly uk-bolly self-requested a review February 13, 2026 15:05
@tmeckel
Copy link
Contributor Author

tmeckel commented Feb 13, 2026

hi @tmeckel

Thank you for the PR, unfortunately they are not passing DCO. While the commits are GPG signed they are not signed-off-by. If you could possibly sign off all the commits we can review the PR.

Many thanks

uk-bolly

@uk-bolly THX for the hint. Just still working on the UBUNTU24-CIS version of the PR ansible-lockdown/UBUNTU24-CIS#137. When I have both in sync I'll sign off all the commits again. I'll keep you posted 👍🏼

@uk-bolly
Copy link
Member

hi @tmeckel

Thank you but we seem to still have an issue with the DCO for your commits.
Also the change for apt 5.3.1 you dont need to change the module, the package module can do exactly that and using the apt module under the hood. We prefer to use the generic one that utilises the discovered package rather than fix it.

Kindest regards

uk-bolly

@uk-bolly uk-bolly self-assigned this Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants