Skip to content

Commit 0fa32ea

Browse files
author
Daniel Schaaff
committed
Add support for Mac OS X
1 parent fbeae85 commit 0fa32ea

File tree

2 files changed

+28
-5
lines changed

2 files changed

+28
-5
lines changed

manifests/agent.pp

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
# ['puppet_server'] - The dns name of the puppet master
77
# ['puppet_server_port'] - The Port the puppet master is running on
88
# ['puppet_agent_service'] - The service the puppet agent runs under
9+
# ['mac_version'] - The package version for Mac OS X
10+
# ['mac_facter_version'] - The Factor Version for Mac OS X
911
# ['puppet_agent_package'] - The name of the package providing the puppet agent
1012
# ['version'] - The version of the puppet agent to install
1113
# ['puppet_run_style'] - The run style of the agent either 'service', 'cron', 'external' or 'manual'
@@ -121,9 +123,25 @@
121123
gid => $group_id,
122124
}
123125
}
124-
package { $puppet_agent_package:
125-
ensure => $version,
126-
provider => $package_provider,
126+
case $::osfamily {
127+
'Darwin': {
128+
package {$puppet_facter_package:
129+
ensure => present,
130+
provider => $package_provider,
131+
source => "https://downloads.puppetlabs.com/mac/facter-${mac_facter_version}.dmg",
132+
}
133+
package { $puppet_agent_package:
134+
ensure => present,
135+
provider => $package_provider,
136+
source => "https://downloads.puppetlabs.com/mac/puppet-${mac_version}.dmg'"
137+
}
138+
}
139+
default: {
140+
package { $puppet_agent_package:
141+
ensure => $version,
142+
provider => $package_provider,
143+
}
144+
}
127145
}
128146

129147
if $puppet_run_style == 'service' {

manifests/params.pp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
$digest_algorithm = 'md5'
3434
$puppet_run_interval = 30
3535
$classfile = '$statedir/classes.txt'
36-
$package_provider = undef # falls back to system default
3736
$rundir = '/var/run/puppet'
3837
$puppet_passenger_ssl_protocol = 'TLSv1.2'
3938
$puppet_passenger_ssl_cipher = 'AES256+EECDH:AES256+EDH'
@@ -47,6 +46,7 @@
4746
$puppet_master_service = 'puppetmaster'
4847
$puppet_agent_service = 'puppet'
4948
$puppet_agent_package = 'puppet'
49+
$package_provider = undef # falls back to system default
5050
$puppet_defaults = '/etc/sysconfig/puppet'
5151
$puppet_conf = '/etc/puppet/puppet.conf'
5252
$puppet_vardir = '/var/lib/puppet'
@@ -60,6 +60,7 @@
6060
$puppet_master_service = 'puppetmasterd'
6161
$puppet_agent_service = 'puppet'
6262
$puppet_agent_package = 'puppet'
63+
$package_provider = undef # falls back to system default
6364
$puppet_conf = '/etc/puppet/puppet.conf'
6465
$puppet_vardir = '/var/lib/puppet'
6566
$puppet_ssldir = '/var/lib/puppet/ssl'
@@ -71,6 +72,7 @@
7172
$puppet_master_service = 'puppetmaster'
7273
$puppet_agent_service = 'puppet'
7374
$puppet_agent_package = 'puppet'
75+
$package_provider = undef # falls back to system default
7476
$puppet_defaults = '/etc/default/puppet'
7577
$puppet_conf = '/etc/puppet/puppet.conf'
7678
$puppet_vardir = '/var/lib/puppet'
@@ -82,13 +84,16 @@
8284
'FreeBSD': {
8385
$puppet_agent_service = 'puppet'
8486
$puppet_agent_package = 'sysutils/puppet'
87+
$package_provider = undef # falls back to system default
8588
$puppet_conf = '/usr/local/etc/puppet/puppet.conf'
8689
$puppet_vardir = '/var/puppet'
8790
$puppet_ssldir = '/var/puppet/ssl'
8891
}
8992
'Darwin': {
9093
$puppet_agent_service = 'com.puppetlabs.puppet'
91-
$puppet_agent_package = 'puppet'
94+
$puppet_agent_package = 'puppet-3.8.4.dmg'
95+
$puppet_facter_package = 'facter.2.4.4.dmg'
96+
$package_provider = 'pkgdmg'
9297
$puppet_conf = '/etc/puppet/puppet.conf'
9398
$puppet_vardir = '/var/lib/puppet'
9499
$puppet_ssldir = '/etc/puppet/ssl'

0 commit comments

Comments
 (0)