Files
valid.nsupdate_zone/verify.sh
Daniel Akulenok 0142f806c9 First commit
2026-01-29 11:05:17 +01:00

67 lines
1.9 KiB
Bash

#!/bin/bash
# Quick verification and installation script for valid.nsupdate_zone collection
set -e
echo "=== Valid.Nsupdate_zone Collection Verification ==="
echo ""
# Check collection structure
echo "✓ Checking collection structure..."
if [ -f "galaxy.yml" ] && [ -f "plugins/modules/nsupdate_zone.py" ]; then
echo " ✓ Core files present"
else
echo " ✗ Missing core files"
exit 1
fi
# Check if collection is built
echo "✓ Checking collection build..."
if [ -f "valid-nsupdate_zone-1.0.0.tar.gz" ]; then
echo " ✓ Collection tarball exists ($(du -h valid-nsupdate_zone-1.0.0.tar.gz | cut -f1))"
else
echo " ✗ Collection not built. Run: ansible-galaxy collection build"
exit 1
fi
# Check Python module syntax
echo "✓ Checking Python syntax..."
if python3 -m py_compile plugins/modules/nsupdate_zone.py 2>/dev/null; then
echo " ✓ nsupdate_zone.py syntax valid"
else
echo " ✗ Syntax errors in nsupdate_zone.py"
exit 1
fi
if python3 -m py_compile plugins/module_utils/deps.py 2>/dev/null; then
echo " ✓ deps.py syntax valid"
else
echo " ✗ Syntax errors in deps.py"
exit 1
fi
# Check documentation
echo "✓ Checking documentation..."
docs_count=$(find docs -name "*.yml" -o -name "*.md" | grep -v docsite | wc -l)
echo " ✓ Found $docs_count documentation files"
echo ""
echo "=== Verification Complete ==="
echo ""
echo "Collection is ready to install!"
echo ""
echo "To install:"
echo " ansible-galaxy collection install valid-nsupdate_zone-1.0.0.tar.gz"
echo ""
echo "To use in playbooks:"
echo " - name: Update DNS"
echo " valid.nsupdate_zone.nsupdate_zone:"
echo " key_name: \"nsupdate\""
echo " key_secret: \"{{ vault_dns_key }}\""
echo " zones:"
echo " - name: example.com"
echo " dns_server: ns1.example.com"
echo " records: ..."
echo ""
echo "See docs/QUICK_START.md for more information."