Skip to content

Conversation

@errnair
Copy link
Owner

@errnair errnair commented Nov 1, 2025

Description

Modernized the remaining four installation scripts (Nagios, Salt Master, Salt Minion, Squid) with multi-OS support, modern repositories, and comprehensive configurations.

Changes

install_nagios.sh

  • Multi-OS support: RHEL/Rocky/AlmaLinux/Ubuntu/Debian
  • Updated versions: Nagios Core 4.5.0, Plugins 2.4.6, NRPE 4.1.0
  • Builds from source with proper compilation flags
  • Secure password input for web admin (no command-line passwords)
  • SELinux configuration with proper contexts
  • Auto-generates example configuration files
  • Firewall support (firewalld and ufw)
  • Comprehensive testing and validation

install_salt.sh

  • Multi-OS support with updated SaltProject repositories
  • Modern repo.saltproject.io URLs (Python 3)
  • Version selection: latest or specific version
  • Optional components: minion, ssh, cloud
  • Auto-generates master configuration in /etc/salt/master.d/
  • Creates example Salt states (top.sls, common.sls)
  • Firewall configuration for Salt ports 4505 and 4506
  • Minion key acceptance and connectivity testing

install_salt_minion.sh

  • Multi-OS support with SaltProject repos
  • Requires master IP/hostname as parameter
  • Version selection support
  • Custom minion ID configuration
  • Proper minion.d configuration structure
  • Validates master address (IP, hostname, or FQDN)
  • Connection testing with troubleshooting guide
  • Comprehensive setup instructions for master

install_squid.sh

  • Multi-OS support: RHEL/Rocky/AlmaLinux/Ubuntu/Debian
  • Three proxy modes: forward, transparent, reverse
  • Configurable port and cache size
  • Network ACL support (CIDR notation)
  • Website blocking capability (/etc/squid/blocked_sites)
  • Configuration backup with timestamps
  • Cache directory initialization
  • Firewall configuration

Usage Examples

# Nagios
./install_nagios.sh

# Salt Master
./install_salt.sh
SALT_VERSION=3006 ./install_salt.sh

# Salt Minion
./install_salt_minion.sh 192.168.1.100
MINION_ID=webserver01 ./install_salt_minion.sh salt.master

# Squid (forward proxy)
./install_squid.sh
ALLOWED_NETWORK=192.168.1.0/24 ./install_squid.sh

# Squid (transparent proxy)
SQUID_MODE=transparent ./install_squid.sh

# Squid (reverse proxy)
SQUID_MODE=reverse BACKEND_HOST=10.0.0.50 BACKEND_PORT=8080 ./install_squid.sh

Tests

All scripts passed testing:

  • Bash syntax validation: OK
  • Library integration: verified
  • Common library functions properly utilized
  • Error handling with set -euo pipefail: verified

Updated four installation scripts with multi-OS support, modern repositories, and enhanced configurations.

install_nagios.sh:
- Multi-OS support: RHEL/Rocky/AlmaLinux/Ubuntu/Debian
- Updated to Nagios Core 4.5.0, Plugins 2.4.6, NRPE 4.1.0
- Builds from source with latest versions
- Secure password input for web admin
- SELinux configuration with proper contexts
- Example states and configuration files
- Comprehensive post-installation documentation

install_salt.sh:
- Multi-OS support with SaltProject repos
- Updated to modern repo.saltproject.io URLs
- Version selection (latest or specific)
- Optional components: minion, ssh, cloud
- Auto-generates basic master configuration
- Creates example Salt states (top.sls, common.sls)
- Firewall configuration for ports 4505 and 4506
- Connectivity testing

install_salt_minion.sh:
- Multi-OS support with SaltProject repos
- Requires master IP/hostname parameter
- Version selection support
- Custom minion ID configuration
- Proper minion.d configuration structure
- Connection testing and troubleshooting guide
- Comprehensive setup instructions

install_squid.sh:
- Multi-OS support: RHEL/Rocky/AlmaLinux/Ubuntu/Debian
- Three proxy modes: forward, transparent, reverse
- Configurable port and cache size
- Network ACL support
- Website blocking capability
- Configuration backup with timestamps
- Cache initialization
- Firewall configuration

Tests:
- Bash syntax validation passed for all four scripts
- Library integration verified
- Common library functions properly utilized
@errnair errnair merged commit 52a1f2d into master Nov 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants