Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install createrepo for airgap #13853

Open
wants to merge 3 commits into
base: 2.4/dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions salt/manager/init.sls
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ yara_log_dir:
- user
- group

{% if GLOBALS.os_family == 'RedHat' %}
install_createrepo:
pkg.installed:
- name: createrepo_c
{% endif %}

repo_conf_dir:
file.directory:
- name: /opt/so/conf/reposync
Expand Down
3 changes: 1 addition & 2 deletions setup/so-functions
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,6 @@ create_manager_pillars() {

create_repo() {
title "Create the repo directory"
logCmd "dnf -y install yum-utils createrepo"
logCmd "createrepo /nsm/repo"
}

Expand Down Expand Up @@ -1821,14 +1820,14 @@ repo_sync_local() {
echo "gpgcheck=1" >> /opt/so/conf/reposync/repodownload.conf

logCmd "dnf repolist"
logCmd "dnf -y install yum-utils createrepo"

if [[ ! $is_airgap ]]; then
curl --retry 5 --retry-delay 60 -A "netinstall/$SOVERSION/$OS/$(uname -r)/1" https://sigs.securityonion.net/checkup --output /tmp/install
retry 5 60 "dnf reposync --norepopath -g --delete -m -c /opt/so/conf/reposync/repodownload.conf --repoid=securityonionsync --download-metadata -p /nsm/repo/" >> "$setup_log" 2>&1 || fail_setup
# After the download is complete run createrepo
create_repo
fi

else
# Add the proper repos for unsupported stuff
echo "Adding Repos"
Expand Down
Loading