saltBootstrap/script.sh

19 lines
465 B
Bash
Raw Permalink Normal View History

2022-09-15 18:39:52 +00:00
#!/bin/bash
# Runs salt bootstrap commands to add a minion to salt-master
2022-09-15 18:57:36 +00:00
# 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
2023-11-15 14:57:38 +00:00
echo "master: salt.lan" | tee /etc/salt/minion.d/override.conf
2022-09-15 18:57:36 +00:00
# Restart minion service
systemctl restart salt-minion
2022-09-30 22:55:58 +00:00
# Touch firstRun file
2022-11-08 14:41:18 +00:00
touch /tmp/.firstRun