Skip to content

Commit d5e48f3

Browse files
author
Daniel Schaaff
committed
new version
1 parent afe3fbb commit d5e48f3

40 files changed

+88
-49
lines changed

CHANGELOG

100755100644
File mode changed.

Gemfile

100755100644
File mode changed.

README.markdown

100755100644
File mode changed.

Rakefile

100755100644
File mode changed.

files/hiera.yaml

100755100644
File mode changed.

files/routes.yaml

100755100644
File mode changed.

lib/facter/etckepper_puppet.rb

100755100644
File mode changed.

manifests/agent.pp

100755100644
Lines changed: 41 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
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-
# ['puppet_agent_package'] - The name of the package providing the puppet agent
10-
# ['version'] - The version of the puppet agent to install
119
# ['mac_version'] - The package version for Mac OS X
1210
# ['mac_facter_version'] - The Factor Version for Mac OS X
11+
# ['puppet_agent_package'] - The name of the package providing the puppet agent
12+
# ['version'] - The version of the puppet agent to install
1313
# ['puppet_run_style'] - The run style of the agent either 'service', 'cron', 'external' or 'manual'
1414
# ['puppet_run_interval'] - The run interval of the puppet agent in minutes, default is 30 minutes
1515
# ['puppet_run_command'] - The command that will be executed for puppet agent run
@@ -39,6 +39,9 @@
3939
# ['serialization_package'] - defaults to undef, if provided, we install this package, otherwise we fall back to the gem from 'serialization_format'
4040
# ['http_proxy_host'] - The hostname of an HTTP proxy to use for agent -> master connections
4141
# ['http_proxy_port'] - The port to use when puppet uses an HTTP proxy
42+
# ['localconfig'] - Where puppet agent caches the local configuration. An extension indicating the cache format is added automatically.
43+
# ['rundir'] - Where Puppet PID files are kept.
44+
# ['puppet_ssldir'] - Puppet sll directory
4245
#
4346
# Actions:
4447
# - Install and configures the puppet agent
@@ -57,8 +60,7 @@
5760
$puppet_agent_service = $::puppet::params::puppet_agent_service,
5861
$puppet_agent_package = $::puppet::params::puppet_agent_package,
5962
$version = 'present',
60-
$mac_version = '3.8.6',
61-
$mac_facter_version = '2.4.6',
63+
$puppet_facter_package = $::puppet::params::puppet_facter_package,
6264
$puppet_run_style = 'service',
6365
$puppet_run_command = '/usr/bin/puppet agent --no-daemonize --onetime --logdest syslog > /dev/null 2>&1',
6466
$user_id = undef,
@@ -70,6 +72,7 @@
7072
$syslogfacility = undef,
7173
$priority = undef,
7274
$logdir = undef,
75+
$rundir = $::puppet::params::rundir,
7376

7477
#[agent]
7578
$srv_domain = undef,
@@ -103,6 +106,8 @@
103106
$cron_minute = undef,
104107
$serialization_format = undef,
105108
$serialization_package = undef,
109+
$localconfig = undef,
110+
$puppet_ssldir = $::puppet::params::puppet_ssldir,
106111
) inherits puppet::params {
107112

108113
if ! defined(User[$::puppet::params::puppet_user]) {
@@ -121,15 +126,15 @@
121126
}
122127
case $::osfamily {
123128
'Darwin': {
124-
package {"facter-${mac_facter_version}.dmg":
129+
package {$puppet_facter_package:
125130
ensure => present,
126131
provider => $package_provider,
127-
source => "https://downloads.puppetlabs.com/mac/facter-${mac_facter_version}.dmg",
132+
source => "https://downloads.puppetlabs.com/mac/${puppet_facter_package}",
128133
}
129-
package { "puppet-${mac_version}.dmg":
134+
package { $puppet_agent_package:
130135
ensure => present,
131136
provider => $package_provider,
132-
source => "https://downloads.puppetlabs.com/mac/puppet-${mac_version}.dmg"
137+
source => "https://downloads.puppetlabs.com/mac/${puppet_agent_package}"
133138
}
134139
}
135140
default: {
@@ -139,6 +144,7 @@
139144
}
140145
}
141146
}
147+
142148
if $puppet_run_style == 'service' {
143149
$startonboot = 'yes'
144150
}
@@ -271,6 +277,30 @@
271277
}else {
272278
$orderign_ensure = 'absent'
273279
}
280+
if $localconfig != undef {
281+
ini_setting {'puppetagentlocalconfig':
282+
ensure => present,
283+
setting => 'localconfig',
284+
value => $localconfig,
285+
}
286+
}
287+
if $puppet_ssldir != undef {
288+
ini_setting {'puppetagentsldir':
289+
ensure => present,
290+
section => 'main',
291+
setting => 'ssldir',
292+
value => $puppet_ssldir,
293+
}
294+
}
295+
296+
# rundir has no default and must be provided.
297+
ini_setting {'puppetagentrundir':
298+
ensure => present,
299+
section => 'main',
300+
setting => 'rundir',
301+
value => $rundir,
302+
}
303+
274304
ini_setting {'puppetagentordering':
275305
ensure => $orderign_ensure,
276306
setting => 'ordering',
@@ -460,9 +490,9 @@
460490
}
461491
unless defined(Package['msgpack']) {
462492
package {'msgpack':
463-
ensure => 'latest',
464-
provider => 'gem',
465-
require => Package[$::puppet::params::ruby_dev, 'gcc'],
493+
ensure => 'latest',
494+
provider => 'gem',
495+
require => Package[$::puppet::params::ruby_dev, 'gcc'],
466496
}
467497
}
468498
}

manifests/master.pp

100755100644
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@
100100
$passenger_high_performance = on,
101101
$passenger_max_requests = 10000,
102102
$passenger_stat_throttle_rate = 30,
103+
$passenger_root = undef,
103104
$serialization_format = undef,
104105
$serialization_package = undef,
105106
) inherits puppet::params {
@@ -157,7 +158,7 @@
157158
passenger_high_performance => $passenger_high_performance,
158159
passenger_max_requests => $passenger_max_requests,
159160
passenger_stat_throttle_rate => $passenger_stat_throttle_rate,
160-
161+
passenger_root => $passenger_root,
161162
} ->
162163
Anchor['puppet::master::end']
163164

manifests/masterenv.pp

100755100644
File mode changed.

0 commit comments

Comments
 (0)