Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Packages are updated, but old kernels are not removed #287

Closed
bbaassssiiee opened this issue May 2, 2023 · 3 comments
Closed

Packages are updated, but old kernels are not removed #287

bbaassssiiee opened this issue May 2, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@bbaassssiiee
Copy link
Member

- name: "1.9 | PATCH | Ensure updates, patches, and additional security software are installed"

Updating all packages is fine, but when the kernel is updated, older, possibly vulnerable, versions could be removed to mitigate booting with them.

In the spirit of CIS 1.9, maybe not valid in the strict interpretation...

@uk-bolly uk-bolly self-assigned this May 3, 2023
@uk-bolly uk-bolly added the enhancement New feature or request label May 3, 2023
@uk-bolly
Copy link
Member

uk-bolly commented May 3, 2023

hi @bbaassssiiee

Great idea, we could make this an optional. I would probably look at keeping the last 2(as default)? just for rollback purposes?
Good enhancement.

Cheers

uk-bolly

@Thulium-Drake
Copy link
Contributor

Hi @uk-bolly

At work we use the following playbook include in our maintenance plays:

---
- name: 'Remove old kernel packages'
  hosts: 'all'
  tasks:
    - name: 'Uninstall old kernels'
      ansible.builtin.shell: yum remove $(yum repoquery --installonly --latest-limit=-2 -q)
      when: ansible_facts['os_family'] == 'RedHat'

That might give you a head stat ;-)

uk-bolly added a commit that referenced this issue May 12, 2023
new option to limit installed kernels

Signed-off-by: Mark Bolwell <mark.bollyuk@gmail.com>
@bbaassssiiee
Copy link
Member Author

Does not seem to work yet. Cannot effectuate 1 kernel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants