unset proxmox backup if no backup is enabled
This commit is contained in:
@@ -2,33 +2,6 @@
|
|||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
# Proxmox VM Inventory Exporter
|
|
||||||
#
|
|
||||||
# Exports one JSON object per VM with:
|
|
||||||
# - CPU / RAM
|
|
||||||
# - Network IPs
|
|
||||||
# - Snapshots
|
|
||||||
# - Backup detection
|
|
||||||
# - VM notes
|
|
||||||
# - Disk information
|
|
||||||
#
|
|
||||||
# Requirements:
|
|
||||||
# - curl
|
|
||||||
# - jq
|
|
||||||
# - for ipv4 and ipv6 collection install the proxmox agent on the VM
|
|
||||||
#
|
|
||||||
# Files:
|
|
||||||
# .env
|
|
||||||
#
|
|
||||||
# Example .env:
|
|
||||||
# PM_HOST="https://proxmox.example.com:8006"
|
|
||||||
# PM_USER="root@pam"
|
|
||||||
# PM_PASS="password"
|
|
||||||
#
|
|
||||||
# Output:
|
|
||||||
# ./output/<vmid>.json
|
|
||||||
# -----------------------------------------------------------------------------
|
|
||||||
SCRIPT_PATH="$(readlink -f "${BASH_SOURCE[0]}")"
|
SCRIPT_PATH="$(readlink -f "${BASH_SOURCE[0]}")"
|
||||||
SCRIPT_DIR="$(cd "$(dirname "$SCRIPT_PATH")" && pwd)"
|
SCRIPT_DIR="$(cd "$(dirname "$SCRIPT_PATH")" && pwd)"
|
||||||
|
|
||||||
@@ -287,7 +260,7 @@ while read -r VM; do
|
|||||||
if $backup == "yes" then
|
if $backup == "yes" then
|
||||||
[{"+proxmox":"yes"}]
|
[{"+proxmox":"yes"}]
|
||||||
else
|
else
|
||||||
[]
|
[{"-proxmox":"no"}]
|
||||||
end
|
end
|
||||||
),
|
),
|
||||||
"server_description": $description
|
"server_description": $description
|
||||||
|
|||||||
Reference in New Issue
Block a user