Skip to content

Commit 45375f9

Browse files
committed
P:puppet::server: Sync the private Puppet repository too
It might be interesting to convert this to a git hook at some point to make the sync real-time, but for now we're not going to be regularly running multiple Puppet servers at once this is fine and much less complicated.
1 parent dad2e5d commit 45375f9

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

modules/profile/manifests/puppet/server.pp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,12 +275,20 @@
275275
systemd::timer { 'pull-puppet-ca':
276276
ensure => $is_primary.bool2str('absent', 'present'),
277277
user => 'root',
278-
description => 'rsync puppet CA files from the primary server',
278+
description => 'rsync Puppet CA files from the primary server',
279279
# TODO: stop hardcoding path once fully on Debian 12
280280
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/",
281281
interval => ['OnCalendar=*-*-* *:4/5:00'],
282282
}
283283

284+
systemd::timer { 'pull-puppet-private':
285+
ensure => $is_primary.bool2str('absent', 'present'),
286+
user => 'root',
287+
description => 'rsync Puppet private repository from the primary server',
288+
command => "/usr/bin/rsync -avp --delete --chown gitpuppet:gitpuppet -e \"/usr/bin/ssh -i /etc/ssh/local_keys.d/puppet-sync\" ${primary_host}:${private_repo_dir}/ ${private_repo_dir}/",
289+
interval => ['OnCalendar=*-*-* *:2/5:00'],
290+
}
291+
284292
# Expose SSH keys so users can verify them
285293
file { '/srv/www':
286294
ensure => directory,

0 commit comments

Comments
 (0)