Skip to content

Commit 2c174e1

Browse files
Merge branch 'dschaaff-mac_support'
2 parents c8ba142 + 01e11e8 commit 2c174e1

File tree

5 files changed

+51
-5
lines changed

5 files changed

+51
-5
lines changed

manifests/agent.pp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,13 @@
151151

152152
if $puppet_run_style == 'service' {
153153
$startonboot = 'yes'
154+
$daemonize = true
154155
}
155156
else {
156157
$startonboot = 'no'
158+
$daemonize = false
157159
}
160+
158161

159162
if ($::osfamily == 'Debian' and $puppet_run_style != 'manual') or ($::osfamily == 'Redhat') {
160163
file { $puppet::params::puppet_defaults:
@@ -165,6 +168,14 @@
165168
content => template("puppet/${puppet::params::puppet_defaults}.erb"),
166169
}
167170
}
171+
elsif $::osfamily == 'Darwin' {
172+
file {'/Library/LaunchDaemons/com.puppetlabs.puppet.plist':
173+
mode => '0644',
174+
owner => 'root',
175+
group => 'wheel',
176+
content => template('puppet/launchd/com.puppetlabs.puppet.plist.erb'),
177+
}
178+
}
168179

169180
if ! defined(File[$::puppet::params::confdir]) {
170181
file { $::puppet::params::confdir:
@@ -525,4 +536,4 @@
525536
value => $serialization_format,
526537
}
527538
}
528-
}
539+
}

manifests/master.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,4 +386,4 @@
386386
}
387387
}
388388
anchor { 'puppet::master::end': }
389-
}
389+
}

manifests/params.pp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,12 @@
9696
}
9797
'Darwin': {
9898
$puppet_agent_service = 'com.puppetlabs.puppet'
99-
$puppet_agent_package = 'puppet-3.8.5.dmg'
100-
$puppet_facter_package = 'facter-2.4.5.dmg'
99+
$puppet_agent_package = 'puppet-3.8.6.dmg'
100+
$puppet_facter_package = 'facter-2.4.6.dmg'
101101
$package_provider = 'pkgdmg'
102+
$puppet_conf = '/etc/puppet/puppet.conf'
103+
$puppet_vardir = '/var/lib/puppet'
104+
$puppet_ssldir = '/var/lib/puppet/ssl'
102105
}
103106
default: {
104107
err('The Puppet module does not support your os')

manifests/passenger.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,4 +202,4 @@
202202
value => 'SSL_CLIENT_VERIFY',
203203
require => File[$puppet_conf],
204204
}
205-
}
205+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>Disabled</key>
6+
<true/>
7+
<key>Label</key>
8+
<string>com.puppetlabs.puppet</string>
9+
<key>OnDemand</key>
10+
<false/>
11+
<key>ProgramArguments</key>
12+
<array>
13+
<string>/usr/bin/puppet</string>
14+
<string>agent</string>
15+
<%- if @puppet_run_style == "service" -%>
16+
<string>daemonize</string>
17+
<%- else -%>
18+
<string>no-daemonize</string>
19+
<%- end -%>
20+
<string>--logdest</string>
21+
<string>syslog</string>
22+
<string>--color</string>
23+
<string>false</string>
24+
</array>
25+
<key>RunAtLoad</key>
26+
<true/>
27+
<key>ServiceDescription</key>
28+
<string>Puppet agent service</string>
29+
<key>ServiceIPC</key>
30+
<false/>
31+
</dict>
32+
</plist>

0 commit comments

Comments
 (0)