Created
September 28, 2020 11:46
-
-
Save DevopsVlogger/6bdbeed1c0bc8aa2337e226cac719353 to your computer and use it in GitHub Desktop.
Ansible Playbook to perform old Kernel removal on RHEL/CentOS Server
This file contains 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
--- | |
#### Ansible Playbook to perform old Kernel removal on RHEL/CentOS Server #### | |
tasks: | |
- name: Ensure the latest yum-utils package is available on the server | |
yum: | |
name: yum-utils | |
state: latest | |
- name: remove the old kernels from the system | |
shell: package-cleanup --oldkernels --count=2 -y | |
ignore_errors: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment