Hi All,
I'm looking to clean up the way I deploy packages to OS X clients. I
have a puppetmaster and a webserver that hosts installation .pkg files
at every site in our district. I've been using variations of the
pkg_deploy.pp file that utilizes the pkgdmg provider: Here's the
file:
define pkg_deploy($sourcedir = false)
{
$sourcedir_real = $sourcedir ? {
false => "
http://testing.huronhs.com/pkgs/general_image",
default => $sourcedir
}
package { $name:
ensure => installed,
provider => pkgdmg,
source => "$sourcedir_real/$name"
}
}
Every building has a general classfile which utilizes pkg_deploy to
install packages - here's a sample file at one of our buildings:
class wes_general_image {
include staff
# Custom Installers First
pkg_deploy_wes {"Office2004.dmg":
alias => office2004wes,
before => Package[officeupdateswes],
}
Package
}
pkg_deploy {"iLife09.dmg":
alias => ilife09wes,
}
pkg_deploy {"iWork09.dmg":
alias => iwork09wes,
}
pkg_deploy {"OfficeUpdates.dmg":
alias => officeupdateswes,
require => Package[office2004wes],
}
pkg_deploy {"Firstclass.dmg": alias => firstclasswes}
pkg_deploy {"Textwrangler23.dmg": alias => textwrangler23wes}
pkg_deploy {"ServerAdmin1057.dmg": alias => serveradmin1057wes}
pkg_deploy {"Timezone.dmg": alias => timezonewes}
} # End of Class
CURRENTLY, I've created separate pkg_deploy classfiles which change
$sourcedir to point back to the local server hosting the package
file. This meant I was creating a "pkg_deploy_buildingname.pp"
classfile for every building, and then every general classfile would
have to make a pkg_deploy_buildingname {} call. It's ugly and
improper, and I need to fix it.
My question is - would I create a single class file for the district
that defines all the packages ala: pkg_deploy{"Package.pkg": alias =>
pkgalias} and then have separate building-level files that include
this file but somehow modify the $sourcedir variable? What would that
call look like? Thanks for any help/pointers you guys can give me!
-Gary