Add support for Airgap for Playbooks

This commit is contained in:
Josh Brower
2025-06-06 16:17:14 -04:00
parent aca54b4645
commit a3b5db5945
5 changed files with 28 additions and 1 deletions

View File

@@ -1069,6 +1069,11 @@ update_airgap_rules() {
rsync -a $UPDATE_DIR/agrules/securityonion-resources/* /nsm/securityonion-resources/
}
update_airgap_playbooks() {
# Copy the playbooks over to update them for airgap.
rsync -a --delete --chown=socore:socore $UPDATE_DIR/airgap-resources/playbooks/* /nsm/airgap-resources/playbooks/
}
update_airgap_repo() {
# Update the files in the repo
echo "Syncing new updates to /nsm/repo"
@@ -1253,6 +1258,7 @@ apply_hotfix() {
elif [[ "$INSTALLEDVERSION" == "2.4.30" ]] ; then
if [[ $is_airgap -eq 0 ]]; then
update_airgap_rules
update_airgap_playbooks
fi
if [[ -f /etc/pki/managerssl.key.old ]]; then
echo "Skipping Certificate Generation"
@@ -1418,6 +1424,8 @@ main() {
if [[ $is_airgap -eq 0 ]]; then
echo "Updating Rule Files to the Latest."
update_airgap_rules
echo "Updating Playbooks to the Latest."
update_airgap_playbooks
fi
# since we don't run the backup.config_backup state on import we wont snapshot previous version states and pillars