Skip to content

Commit

Permalink
(#780) puppetserver: don't purge metrics.conf
Browse files Browse the repository at this point in the history
  • Loading branch information
bastelfreak authored and ekohl committed Mar 29, 2021
1 parent c6b8b4c commit 2ffa254
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions manifests/server/puppetserver.pp
Original file line number Diff line number Diff line change
Expand Up @@ -262,13 +262,8 @@
content => template('puppet/server/puppetserver/conf.d/product.conf.erb'),
}

$metrics_conf_ensure = $server_metrics ? {
true => file,
default => absent
}

file { "${server_puppetserver_dir}/conf.d/metrics.conf":
ensure => $metrics_conf_ensure,
ensure => 'file',
content => template('puppet/server/puppetserver/conf.d/metrics.conf.erb'),
}
}
2 changes: 1 addition & 1 deletion spec/classes/puppet_server_puppetserver_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@
.with_content(/^ # Whether to enable http-client metrics; defaults to 'true'.\n metrics-enabled: false$/)
.with_content(/^profiler: \{\n # enable or disable profiling for the Ruby code;\n enabled: false/)
}
it { should contain_file('/etc/custom/puppetserver/conf.d/metrics.conf').with_ensure('absent') }
it { should contain_file('/etc/custom/puppetserver/conf.d/metrics.conf').with_ensure('file') }
end
end

Expand Down

0 comments on commit 2ffa254

Please sign in to comment.