refactor airgap playbook to eliminate dupe code and shrink ISO

This commit is contained in:
Jason Ertel
2025-06-24 09:34:57 -04:00
parent 6fc7c930a6
commit b052a75e64
4 changed files with 13 additions and 15 deletions

View File

@@ -99,6 +99,17 @@ add_interface_bond0() {
fi
}
airgap_playbooks() {
SRC_DIR=$1
# Copy playbooks if using airgap
mkdir -p /nsm/airgap-resources
# Purge old airgap playbooks to ensure SO only uses the latest released playbooks
rm -fr /nsm/airgap-resources/playbooks
logCmd "tar xf $SRC_DIR/airgap-resources/playbooks.tgz -C /nsm/airgap-resources/"
logCmd "chown -R socore:socore /nsm/airgap-resources/playbooks"
logCmd "git config --global --add safe.directory /nsm/airgap-resources/playbooks"
}
check_container() {
docker ps | grep "$1:" > /dev/null 2>&1
return $?