Add OneLab Helm chart, Argo CD Application, and GitOps values for k3s
Made-with: Cursor
This commit is contained in:
26
app/update.sh
Normal file
26
app/update.sh
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
# Usage: ./update.sh [version] [--force]
|
||||
|
||||
onelab_version=""
|
||||
onelab_force_update=""
|
||||
|
||||
for arg in "$@"; do
|
||||
if [[ "$arg" == "--force" ]]; then
|
||||
onelab_force_update="--force"
|
||||
else
|
||||
onelab_version="$arg"
|
||||
fi
|
||||
done
|
||||
|
||||
LOG_PATH="./logs/ansible/$(date +%F)-ansible.log"
|
||||
PLAYBOOK="./installation/1.27.0/app/playbooks/update.yml"
|
||||
EXTRA_VARS=()
|
||||
|
||||
if [[ -n "$onelab_version" ]]; then
|
||||
EXTRA_VARS+=("-e" "version=$onelab_version")
|
||||
fi
|
||||
if [[ -n "$onelab_force_update" ]]; then
|
||||
EXTRA_VARS+=("-e" "userchoice=yes")
|
||||
fi
|
||||
|
||||
ANSIBLE_LOG_PATH="$LOG_PATH" ansible-playbook "$PLAYBOOK" "${EXTRA_VARS[@]}"
|
||||
Reference in New Issue
Block a user