Skip to content
This repository has been archived by the owner on Jun 11, 2019. It is now read-only.

Commit

Permalink
Fixed default options and templates for puppetserver
Browse files Browse the repository at this point in the history
  • Loading branch information
alvagante committed May 4, 2016
1 parent 66225b8 commit 9cbb00c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 19 deletions.
1 change: 1 addition & 0 deletions data/puppet-agent/default.yaml
Expand Up @@ -16,3 +16,4 @@
process_name: 'puppet'
process_user: 'root'
process_group: 'root'
config_file_template: 'puppet/profile/agent/init.erb'
3 changes: 2 additions & 1 deletion data/puppetserver/default.yaml
Expand Up @@ -18,8 +18,9 @@
config_dir_group: 'puppet'
config_dir_mode: '0750'
nodaemon_args: 'foreground'
init_file_template: 'puppet/profile/server/init.erb'

puppetserver::options::init:
puppetserver::options::init:
java_args: '-Xms2g -Xmx2g -XX:MaxPermSize=256m'
service_stop_retries: '60'
start_timeout: '120'
23 changes: 5 additions & 18 deletions manifests/profile/server.pp
Expand Up @@ -11,23 +11,9 @@

include ::puppet

$tp_settings = tp_lookup('puppetserver','settings',$::puppet::data_module,'merge')
$module_settings = $tp_settings + $settings

$tp_config_options=tp_lookup('puppetserver','options::puppetserver::config',$::puppet::data_module,merge)
$tp_init_options=tp_lookup('puppetserver','options::puppetserver::init',$::puppet::data_module,merge)
$real_config_options=$tp_config_options + $options
$real_init_options=$tp_init_options + $options

if $module_settings['service_name'] and $service_autorestart {
$service_notify = "Service[${module_settings['service_name']}]"
} else {
$service_notify = undef
}

::tp::install { 'puppetserver':
ensure => $ensure,
settings_hash => $module_settings,
settings_hash => $settings,
data_module => $::puppet::data_module,
auto_conf => false,
}
Expand All @@ -36,7 +22,8 @@
::tp::conf { 'puppetserver':
ensure => $ensure,
template => $config_template,
settings_hash => $module_settings,
settings_hash => $settings,
options_hash => $options,
config_file_notify => $service_autorestart,
data_module => $::puppet::data_module,
}
Expand All @@ -46,8 +33,8 @@
::tp::conf { 'puppetserver::init':
ensure => $ensure,
template => $init_template,
options_hash => $real_init_options,
settings_hash => $module_settings,
options_hash => $options,
settings_hash => $settings,
base_file => 'init',
config_file_notify => $service_autorestart,
data_module => $::puppet::data_module,
Expand Down

0 comments on commit 9cbb00c

Please sign in to comment.