mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2026-02-20 14:05:26 +01:00
Saltify it up
This commit is contained in:
16
salt/manager/files/so-repo-sync
Normal file
16
salt/manager/files/so-repo-sync
Normal file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one
|
||||
# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at
|
||||
# https://securityonion.net/license; you may not use this file except in compliance with the
|
||||
# Elastic License 2.0.
|
||||
NOROOT=1
|
||||
. /usr/sbin/so-common
|
||||
|
||||
set_version
|
||||
set_os
|
||||
salt_minion_count
|
||||
|
||||
curl --retry 5 --retry-delay 60 -A 'checkin/$VERSION/$OS/$(uname -r)/$MINIONCOUNT' https://sigs.securityonion.net/checkup --output /tmp/checkup
|
||||
dnf reposync --norepopath -g --delete -m -c /root/repodownload.conf --repoid=securityonionsync --download-metadata -p /nsm/repo/
|
||||
createrepo /nsm/repo
|
||||
@@ -34,6 +34,14 @@ repo_dir:
|
||||
- user
|
||||
- group
|
||||
|
||||
repo_sync_script:
|
||||
file.managed:
|
||||
- name: /usr/sbin/so-repo-sync
|
||||
- source: salt://manager/files/so-repo-sync
|
||||
- user: root
|
||||
- group: root
|
||||
- mode: 755
|
||||
|
||||
reposync_cron:
|
||||
{% if MANAGERMERGED.reposync.enabled %}
|
||||
cron.present:
|
||||
|
||||
Reference in New Issue
Block a user