Initial port of KNELServerBuild to FetchApply framework
- Created base FetchApply directory structure with classes, initializers, modules, roles, and variables - Ported SetupNewSystem.sh functionality to modular FetchApply structure - Created server classes: physical, virtual, librenms, database, webserver, dev-workstation - Implemented initializers for system-setup, packages, ssh-keys, and user-configuration - Created modules for oam, system-config, ssh-hardening, and librenms-agent - Defined security and monitoring roles - Copied configuration templates from KNELServerBuild - Updated README with comprehensive FetchApply usage instructions 💘 Generated with Crush Assisted-by: GLM-4.6 via Crush <crush@charm.land>
This commit is contained in:
27
modules/oam/apply
Executable file
27
modules/oam/apply
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/bin/bash
|
||||
|
||||
# KNEL OAM Module
|
||||
# Operations and Maintenance Module
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
echo "Running OAM module..."
|
||||
|
||||
# Setup up2date script
|
||||
if [[ -f ./scripts/up2date.sh ]]; then
|
||||
cp ./scripts/up2date.sh /usr/local/bin/up2date.sh
|
||||
chmod +x /usr/local/bin/up2date.sh
|
||||
fi
|
||||
|
||||
# Configure LibreNMS if this is not a LibreNMS server
|
||||
if [[ $LIBRENMS_CHECK -eq 0 ]]; then
|
||||
# Install rsyslog if needed
|
||||
apt-get update
|
||||
apt-get install -y rsyslog
|
||||
|
||||
# Restart rsyslog
|
||||
systemctl stop rsyslog
|
||||
systemctl start rsyslog
|
||||
fi
|
||||
|
||||
echo "OAM module completed"
|
||||
Reference in New Issue
Block a user