Debian 8.x Salt deployment

by stirlab
7 deployments · 2 still active · last rev. 13 days ago

Aids in automatic Salt deployment

Compatible with: Debian 8
						#!/bin/bash

#############################################################
# UDF config variables.
#############################################################

<<HEREDOC >/dev/null

<udf 
  name="server_config_hostname"
  label="Hostname"
  example="FQDN of the server"
/>

HEREDOC

#############################################################
# End UDF config variables.
#############################################################

exec &> /root/stackscript.log

# Log messages to syslog and console.
log() {
  local message=$1
  logger "STACKSCRIPT: $message"
  echo "$message"
}

log "Starting installation for host ${SERVER_CONFIG_HOSTNAME}..."

log "Configuring custom Debian 8.x kernel..."
source <ssinclude StackScriptID="254105">

log "Installing some essential packages..."
apt-get -y install rsync vim

# This file marker enables the deployment script to know when the StackScript is complete.
/bin/echo "true" > /tmp/stackscript_complete