mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
fix yum db if corrupted - https://github.com/Security-Onion-Solutions/securityonion/issues/163
This commit is contained in:
@@ -56,6 +56,12 @@ salttmp:
|
||||
|
||||
# Install epel
|
||||
{% if grains['os'] == 'CentOS' %}
|
||||
repair_yumdb:
|
||||
cmd.run:
|
||||
- name: 'mv -f /var/lib/rpm/__db* /tmp && yum clean all'
|
||||
- onlyif:
|
||||
- 'yum check-update 2>&1 | grep "Error: rpmdb open failed"'
|
||||
|
||||
epel:
|
||||
pkg.installed:
|
||||
- skip_suggestions: True
|
||||
|
||||
Reference in New Issue
Block a user