Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion manifests/master/report_processor.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
if $masterless {
$puppet_conf_section = 'main'
} else {
$puppet_conf_section = 'master'
$puppet_conf_section = 'server'
}
Comment on lines 9 to 13
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can make this a bit shorter:

  $puppet_conf_section = if $masterless {
    'main'
  } else {
   'server'
  }


$puppetdb_ensure = $enable ? {
Expand Down
2 changes: 1 addition & 1 deletion manifests/master/storeconfigs.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
if $masterless {
$puppet_conf_section = 'main'
} else {
$puppet_conf_section = 'master'
$puppet_conf_section = 'server'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

}

$storeconfigs_ensure = $enable ? {
Expand Down
4 changes: 2 additions & 2 deletions spec/unit/classes/master/report_processor_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
with(
'ensure' => 'absent',
'path' => '/etc/puppet/puppet.conf',
'section' => 'master',
'section' => 'server',
'setting' => 'reports',
'subsetting' => 'puppetdb',
'subsetting_separator' => ','
Expand All @@ -44,7 +44,7 @@
with(
'ensure' => 'present',
'path' => '/etc/puppet/puppet.conf',
'section' => 'master',
'section' => 'server',
'setting' => 'reports',
'subsetting' => 'puppetdb',
'subsetting_separator' => ','
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/classes/master/storeconfigs_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
end

let(:param_ensure) { params[:enable] ? 'present' : 'absent' }
let(:puppet_conf_section) { params[:masterless] ? 'main' : 'master' }
let(:puppet_conf_section) { params[:masterless] ? 'main' : 'server' }
let(:puppet_conf) { File.join(Puppet[:confdir], 'puppet.conf') }

context 'with default parameters' do
Expand Down
Loading