saltBootstrap/script.sh
kcrawford 40505a8c7b Update 'script.sh'
Update override to contain a hostname instead of IP.
2022-09-19 18:31:04 +00:00

16 lines
430 B
Bash

#!/bin/bash
# Runs salt bootstrap commands to add a minion to salt-master
# Download bootstrap script from salt
curl -o /tmp/bootstrap-salt.sh -L https://bootstrap.saltproject.io
# Run bootstrap script
if [ -e /tmp/bootstrap-salt.sh ]; then bash /tmp/bootstrap-salt.sh; fi
# Point minion to master
echo "master: salt-master.local" | tee /etc/salt/minion.d/override.conf
# Restart minion service
systemctl restart salt-minion