diff --git a/manifests/init.pp b/manifests/init.pp index 33d5b14..72aa908 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -1,12 +1,22 @@ # install everything required to be a git client class git ( + $ensure = present, $sources = "https://git-osx-installer.googlecode.com/files/git-1.8.3.2-intel-universal-snow-leopard.dmg" ){ include git::params - package { $git::params::packages: - ensure => present, - source => $sources, + case $::operatingsystem { + 'Darwin': { + package { $git::params::packages: + ensure => $ensure, + source => $sources + } + } + default: { + package { $git::params::packages: + ensure => $ensure + } + } } } diff --git a/manifests/params.pp b/manifests/params.pp index 7f0018c..d235bb9 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -1,11 +1,11 @@ # = Class: git::params # class git::params { - case $operatingsystem { + case $::operatingsystem { 'Debian': { $packages = 'git' } 'Ubuntu': { $packages = 'git-core' } 'Ubuntu': { - case $operatingsystemrelease { + case $::operatingsystemrelease { 'Hardy', 'Lucid': { $packages = 'git-core' } default: { $packages = 'git' } } @@ -24,6 +24,6 @@ require => File['/usr/local/bin'], } } - default: { fail("No git package known for operating system ${operatingsystem}") } + default: { fail("No git package known for operating system ${::operatingsystem}") } } }