Skip to content

Instantly share code, notes, and snippets.

View natewalck's full-sized avatar

Nate Walck natewalck

View GitHub Profile
@natewalck
natewalck / gist:4748145
Created February 10, 2013 02:49
Force Refresh MCX during DeployStudio firstboot
echo "Forcing MCX Settings Refresh..."
if [ "`uname -r | cut -d "." -f 1`" -lt "11" ]
then
echo "Killing DirectoryService..."
killall DirectoryService
else
echo "Killing opendirectoryD..."
killall opendirectoryD
fi
@natewalck
natewalck / gist:4748160
Created February 10, 2013 02:52
Forced MCX Refresh during DeployStudio firstboot - old
echo "Setting munki to bootstrap mode..."
touch /Users/Shared/.com.googlecode.munki.checkandinstallatstartup
echo "Forcing MCX Settings Refresh..."
killall DirectoryService
echo "Finished applying firstboot settings."
echo "Sleeping for 60 seconds..."
sleep 60
@natewalck
natewalck / gist:4750211
Created February 10, 2013 16:59
Create Puppet Group and Service Account
sudo puppet resource group puppet ensure=present
sudo puppet resource user puppet ensure=present gid=puppet shell='/sbin/nologin'
@natewalck
natewalck / gist:4750732
Created February 10, 2013 19:30
Puppet Master Debug Run
sudo puppet master --debug --verbose --no-daemonize
@natewalck
natewalck / puppet.conf
Created February 10, 2013 19:41
puppet.conf default settings
# Default Puppet Settings
server = puppet
report = true
pluginsync = true
certname = server.company.com (The FQDN of the machine that is running puppet)
@natewalck
natewalck / puppet.conf
Last active December 12, 2015 09:19
Simple puppet.conf for master
[master]
certname = puppet.company.com
@natewalck
natewalck / gist:4750826
Created February 10, 2013 19:55
create modules directory on puppet master
sudo mkdir /etc/puppet/modules
sudo chown puppet /etc/puppet/modules
@natewalck
natewalck / com.puppetlabs.puppetmaster.plist
Created February 10, 2013 20:02
Puppet Master launchd item
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>/sbin:/usr/sbin:/bin:/usr/bin</string>
<key>RUBYLIB</key>
<string>/usr/lib/ruby/site_ruby/1.8/</string>
@natewalck
natewalck / gist:4750868
Created February 10, 2013 20:05
Set puppet master launchd permissions
sudo chown root:wheel /Library/LaunchDaemons/com.puppetlabs.puppetmaster.plist
sudo chmod 644 /Library/LaunchDaemons/com.puppetlabs.puppetmaster.plist
@natewalck
natewalck / gist:4750877
Created February 10, 2013 20:07
Load the puppet master launchd
sudo launchctl load -w /Library/LaunchDaemons/com.puppetlabs.puppetmaster.plist