Skip to content

Commit

Permalink
Revert "use puppetlabs-hocon for product.conf"
Browse files Browse the repository at this point in the history
This reverts commit 0a45dd1.
  • Loading branch information
mmoll committed Aug 15, 2018
1 parent 89d53af commit 6875759
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 21 deletions.
15 changes: 3 additions & 12 deletions manifests/server/puppetserver.pp
Original file line number Diff line number Diff line change
Expand Up @@ -349,24 +349,15 @@
require => File[$webserver_conf],
}

$product_conf = "${server_puppetserver_dir}/conf.d/product.conf"

if versioncmp($server_puppetserver_version, '2.7') >= 0 {
$product_conf_ensure = file

hocon_setting { 'product.check-for-updates':
ensure => present,
path => $product_conf,
setting => 'product.check-for-updates',
value => $server_check_for_updates,
require => File[$product_conf],
}
} else {
$product_conf_ensure = absent
}

file { $product_conf:
ensure => $product_conf_ensure,
file { "${server_puppetserver_dir}/conf.d/product.conf":
ensure => $product_conf_ensure,
content => template('puppet/server/puppetserver/conf.d/product.conf.erb'),
}

if versioncmp($server_puppetserver_version, '5.0') >= 0 {
Expand Down
10 changes: 1 addition & 9 deletions spec/classes/puppet_server_puppetserver_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -516,14 +516,7 @@
end
it {
should contain_file('/etc/custom/puppetserver/conf.d/product.conf').
with_ensure('file')
}
it {
should contain_hocon_setting('product.check-for-updates').
with_path('/etc/custom/puppetserver/conf.d/product.conf').
with_setting('product.check-for-updates').
with_value(false).
with_ensure('present')
with_content(/^\s+check-for-updates: false/)
}
end

Expand All @@ -535,7 +528,6 @@
)
end
it { should contain_file('/etc/custom/puppetserver/conf.d/product.conf').with_ensure('absent') }
it { should_not contain_hocon_setting('product.check-for-updates') }
end
end

Expand Down
4 changes: 4 additions & 0 deletions templates/server/puppetserver/conf.d/product.conf.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
product: {
# automatic update checks and corresponding analytic data collection
check-for-updates: <%= @server_check_for_updates %>
}

0 comments on commit 6875759

Please sign in to comment.