Add Linux fresh setup toolkit
lint / shell-yaml-ansible (push) Failing after 16s

This commit is contained in:
Mateusz Suski
2026-06-06 00:23:11 +00:00
parent 8cb92de06f
commit 4e739c5c99
25 changed files with 1646 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=00-platform-guard.inc
source "$SCRIPT_DIR/00-platform-guard.inc"
required_packages=(
cockpit cockpit-system cockpit-storaged cockpit-networkmanager
cockpit-packagekit cockpit-machines cockpit-sosreport cockpit-pcp
)
if ((EUID != 0)); then
printf 'CRITICAL: Cockpit setup must run as root\n' >&2
exit 2
fi
require_supported_ubuntu
if ! command -v apt-get >/dev/null 2>&1; then
printf 'CRITICAL: apt-get is required\n' >&2
exit 2
fi
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y "${required_packages[@]}"
if apt-cache show cockpit-files >/dev/null 2>&1; then
DEBIAN_FRONTEND=noninteractive apt-get install -y cockpit-files
printf 'OK: installed optional cockpit-files package\n'
else
printf 'WARNING: cockpit-files is unavailable; continuing without it\n'
fi
systemctl enable --now cockpit.socket
printf 'OK: Cockpit is enabled at https://%s:9090\n' "$(hostname)"