mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2026-04-26 06:27:50 +02:00
Merge remote-tracking branch 'origin/2.4/dev' into vlb2
This commit is contained in:
@@ -156,6 +156,13 @@ rules_dir:
|
||||
- group: socore
|
||||
- makedirs: True
|
||||
|
||||
nsm_playbooks_dir:
|
||||
file.directory:
|
||||
- name: /nsm/airgap-resources/playbooks
|
||||
- user: socore
|
||||
- group: socore
|
||||
- makedirs: True
|
||||
|
||||
git_config_set_safe_dirs:
|
||||
git.config_set:
|
||||
- name: safe.directory
|
||||
@@ -166,6 +173,8 @@ git_config_set_safe_dirs:
|
||||
- /nsm/rules/custom-local-repos/local-yara
|
||||
- /nsm/securityonion-resources
|
||||
- /opt/so/conf/soc/ai_summary_repos/securityonion-resources
|
||||
- /nsm/airgap-resources/playbooks
|
||||
- /opt/so/conf/soc/playbooks
|
||||
{% else %}
|
||||
|
||||
{{sls}}_state_not_allowed:
|
||||
|
||||
@@ -1069,6 +1069,13 @@ 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.
|
||||
mkdir -p /nsm/airgap-resources/playbooks
|
||||
chown -R socore:socore /nsm/airgap-resources/playbooks
|
||||
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"
|
||||
@@ -1418,6 +1425,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
|
||||
|
||||
Reference in New Issue
Block a user