Skip to content

Commit a1667d2

Browse files
committed
P:puppet::server: Pull CA data to non-primary servers
1 parent 7837a5c commit a1667d2

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

modules/profile/manifests/puppet/server.pp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,15 @@
265265

266266
Ssh_authorized_key <<| tag == 'profile::puppet::server::puppet_sync' |>>
267267

268+
systemd::timer { 'pull-puppet-ca':
269+
ensure => $is_primary.bool2str('absent', 'present'),
270+
user => 'root',
271+
description => 'rsync puppet CA files from the primary server',
272+
# TODO: stop hardcoding path once fully on Debian 12
273+
command => "/usr/bin/rsync -avp --delete --chown puppet:puppet -e \"/usr/bin/ssh -i /etc/ssh/local_keys.d/puppet-sync\" ${primary_host}:/etc/puppetlabs/puppetserver/ca ${server_config_path}/ca",
274+
interval => ['OnCalendar=*-*-* *:4/5:00'],
275+
}
276+
268277
# Expose SSH keys so users can verify them
269278
file { '/srv/www':
270279
ensure => directory,

0 commit comments

Comments
 (0)