Skip to content

Commit

Permalink
Manage the repos
Browse files Browse the repository at this point in the history
  • Loading branch information
TOoSmOotH committed Feb 21, 2024
1 parent 2977843 commit 9ca0f58
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 2 deletions.
Empty file added salt/manager/files/mirror.txt
Empty file.
13 changes: 13 additions & 0 deletions salt/manager/files/repodownload.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[main]
gpgcheck=1
installonly_limit=3
clean_requirements_on_remove=True
best=True
skip_if_unavailable=False
cachedir=/opt/so/conf/reposync/cache
keepcache=0
[securityonionsync]
name=Security Onion Repo repo
mirrorlist=file:///opt/so/conf/reposync/mirror.txt
enabled=1
gpgcheck=1
14 changes: 14 additions & 0 deletions salt/manager/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,20 @@ yara_update_scripts:
- defaults:
EXCLUDEDRULES: {{ STRELKAMERGED.rules.excluded }}
so-repo-file:
file.managed:
- name: /opt/so/conf/reposync/repodownload.conf
- source: salt://manager/files/repodownload.conf
- user: socore
- group: socore
so-repo-mirrorlist:
file.managed:
- name: /opt/so/conf/reposync/mirror.txt
- source: salt://manager/files/mirror.txt
- user: socore
- group: socore
so-repo-sync:
{% if MANAGERMERGED.reposync.enabled %}
cron.present:
Expand Down
4 changes: 2 additions & 2 deletions setup/so-functions
Original file line number Diff line number Diff line change
Expand Up @@ -1811,8 +1811,8 @@ repo_sync_local() {
info "Adding Repo Download Configuration"
mkdir -p /nsm/repo
mkdir -p /opt/so/conf/reposync/cache
echo "https://repo.securityonion.net/file/so-repo/prod/2.4/oracle/9" > /opt/so/conf/reposync/mirror.txt
echo "https://so-repo-east.s3.us-east-005.backblazeb2.com/prod/2.4/oracle/9" >> /opt/so/conf/reposync/mirror.txt
echo "https://repo.securityonion.net/file/so-repo/prod/2.4/oracle/9.3" > /opt/so/conf/reposync/mirror.txt
echo "https://repo-alt.securityonion.net/prod/2.4/oracle/9.3" >> /opt/so/conf/reposync/mirror.txt
echo "[main]" > /opt/so/conf/reposync/repodownload.conf
echo "gpgcheck=1" >> /opt/so/conf/reposync/repodownload.conf
echo "installonly_limit=3" >> /opt/so/conf/reposync/repodownload.conf
Expand Down

0 comments on commit 9ca0f58

Please sign in to comment.