Skip to content

Instantly share code, notes, and snippets.

@paul91
Last active May 15, 2017 22:36
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paul91/6143320 to your computer and use it in GitHub Desktop.
Save paul91/6143320 to your computer and use it in GitHub Desktop.
An example Puppet manifest for installing AppDmg and Pkg files on Mac OS X.
# An example Puppet manifest for installing AppDmg and Pkg files on Mac OS X.
#
# Great for installing all required Applications for new developers.
#
# Requirments:
# Install Puppet/Hiera/Facter
#
# Running the Provisioner:
# sudo puppet apply mac-developer.pp
#
# Send all questions to:
# Paul Lewis (paul91 on GitHub)
#
# Setting location and installation provider of app.dmg files
define app_deploy($sourcedir = false)
{
$sourcedir_real = $sourcedir ? {
false => '/location/of/app/dmg/files',
default => $sourcedir
}
package { $name:
ensure => installed,
provider => appdmg,
source => "$sourcedir_real/$name"
}
}
# Setting location and installation provider of pkg files
define pkg_deploy($sourcedir = false)
{
$sourcedir_real = $sourcedir ? {
false => '/location/of/app/pkg/files',
default => $sourcedir
}
package { $name:
ensure => installed,
provider => pkgdmg,
source => "$sourcedir_real/$name"
}
}
class mac-developer {
app_deploy { [
'Adium_1.5.7.dmg',
'Charles.dmg',
'Sublime Text 2.0.2.dmg',
'Transmit.dmg',
'Versions.dmg',
]:
}
pkg_deploy { [
'command_line_tools_mountain_lion_for_xcode_5_june_2013.dmg',
'Vagrant-1.2.7.dmg',
'VirtualBox-4.2.16-86992-OSX.dmg',
]:
}
}
include mac-developer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment