Skip to content

Instantly share code, notes, and snippets.

@mrzarquon
mrzarquon / LazyDrop
Created March 23, 2012 21:02
Quick way to drop a file anywhere with luggage
include /usr/local/share/luggage/luggage.make
TITLE=Jamf_Foo
REVERSE_DOMAIN=org.angrydome
DESTINATIONFOLDER="/Library/Application Support/JAMF/Self Service/Plug-ins/"
FILEPAYLOAD="foobar"
PACKAGE_VERSION=`/usr/bin/git rev-parse --verify HEAD | /usr/bin/cut -c1-10`
PAYLOAD=\
foo
defaults write /Library/Preferences/com.apple.Bluetooth BluetoothAutoSeekKeyboard -bool false
defaults write /Library/Preferences/com.apple.Bluetooth BluetoothAutoSeekPointingDevice -bool false
@mrzarquon
mrzarquon / gist:3687791
Created September 9, 2012 22:52
Hope you've had a nice flight gary
curiosity:puppet-scripts chris$ sudo ./postflight
looking for Puppet User
<dscl_cmd> DS Error: -14136 (eDSRecordNotFound)
Looking for Puppet Group
<dscl_cmd> DS Error: -14136 (eDSRecordNotFound)
Creating Puppet User (uid: 52) in new Puppet Group (gid: 495)
curiosity:puppet-scripts chris$ sudo ./postflight
looking for Puppet User
dsAttrTypeNative:KerberosKeys:
30820151 a1030201 01a08201 48308201 443072a1 2b3029a0 03020112 a1220420 d671c11e 458153bd c7b7f5ae 51cf303f f2688854 6b361774 23dfe1fa 2acd3f38 a2433041 a0030201 03a13a04 384c4b44 433a5348 41312e35 30363944 44433842 30454545 39333646 30423639 31363234 32343836 43313132 41413443 36304270 75707065 743062a1 1b3019a0 03020111 a1120410 0c21266a 91641731 f69dd50a 03d30d3f a2433041 a0030201 03a13a04 384c4b44 433a5348 41312e35 30363944 44433842 30454545 39333646 30423639 31363234 32343836 43313132 41413443 36304270 75707065 74306aa1 233021a0 03020110 a11a0418 70f77057 64e9859e 6d25ec13 a2bab06d d968a79e 152fb58f a2433041 a0030201 03a13a04 384c4b44 433a5348 4131
@mrzarquon
mrzarquon / gist:3754072
Created September 20, 2012 05:09
rc.local to start puppet from a template
/usr/local/bin/puppet agent -t
chkconfig --level 2345 pe-puppet on
chkconfig --level 2345 pe-mcollective on
/etc/init.d/pe-puppet start
/etc/init.d/pe-mcollective start
@mrzarquon
mrzarquon / gist:4042676
Created November 8, 2012 23:46
Puppet Upgrade
[root@centos63a vagrant]# puppet --version
2.7.12 (Puppet Enterprise 2.5.3)
[root@centos63a vagrant]# puppet agent -t
info: Retrieving plugin
info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/pe_version.rb
info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/iptables.rb
info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/root_home.rb
info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/win_common_desktop_directory.rb
info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/concat_basedir.rb
info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/facter_dot_d.rb
@mrzarquon
mrzarquon / gist:4172392
Created November 29, 2012 22:38
pe-httpd port 80 configu
root@master:/etc/puppetlabs/httpd/conf.d# cat enable80.conf
Listen 80
# ls /opt/puppet/htdocs/
index.html
@mrzarquon
mrzarquon / gist:4632484
Created January 25, 2013 07:25
Minimal packages needed for a puppet run.
pe-puppet
pe-facter
pe-puppet-enterprise-release
pe-ruby
pe-ruby-libs
pe-ruby-shadow
@mrzarquon
mrzarquon / gist:4710936
Created February 5, 2013 00:03
Common dependencies / packages
Installed:
apr.x86_64 0:1.3.9-5.el6_2
apr-util.x86_64 0:1.3.9-3.el6_0.1
apr-util-ldap.x86_64 0:1.3.9-3.el6_0.1
cronie.x86_64 0:1.4.4-7.el6
dmidecode.x86_64 1:2.11-2.el6
java-1.6.0-openjdk.x86_64 1:1.6.0.0-1.50.1.11.5.el6_3
libxslt.x86_64 0:1.1.26-2.el6_3.1
mailcap.noarch 0:2.1.31-2.el6
mysql.x86_64 0:5.1.66-2.el6_3
@mrzarquon
mrzarquon / gist:5061494
Created March 1, 2013 00:40
OVFTool quick deploy
/Applications/VMware\ OVF\ Tool/ovftool --skipManifestCheck --name=VCSA-5.1 -dm=thin -ds=datastore1 "--net:Network 1=VM Network" --powerOn VMware-vCenter-Server-Appliance-5.1.0.5300-947940_OVF10.ova vi://10.16.XXX.XXX
@mrzarquon
mrzarquon / service_window
Last active December 14, 2015 11:29
Possible way to stop/start services in a puppet run.
service_window { 'apache-stop':
ensure => stopped,
service_name => 'apache',
}
package { 'new-app':
ensure => installed,
require => Service_Window['apache-stop'],
before => Service_Window['apache-start'],
}