Skip to content

Commit dad2e5d

Browse files
committed
P:puppet::server: Send reports to other PuppetDB instances
1 parent 99a96ad commit dad2e5d

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

modules/profile/manifests/puppet/server.pp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,9 @@
178178
notify => Service['puppetserver'],
179179
}
180180

181+
$puppetservers = jqlib::resource_hosts('class', 'profile::puppet::server')
182+
$puppetservers_notself = $puppetservers.filter |Stdlib::Fqdn $it| { $it != $facts['networking']['fqdn'] }
183+
181184
file { "${profile::puppet::common::config_path}/puppetdb.conf":
182185
ensure => file,
183186
mode => '0444',
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
[main]
2-
server_urls = https://<%= @facts['fqdn'] %>:8081
2+
server_urls = https://<%= @facts['networking']['fqdn'] %>:8081
3+
<%- unless @puppetservers_notself.empty? -%>
4+
submit_only_server_urls = <%= @puppetservers_notself.map {|host| "https://#{host}:8081"}.join(',') %>
5+
command_broadcast = true
6+
<%- end -%>

0 commit comments

Comments
 (0)