- add autosyncer/autopromoter scripts - add timer and service to initial sync process - add timer/service for daily/weekly/monthly autopromote - add define to manage each repo - add nginx webserver to share repos - add favion.ico if enabled - add selinux management, and packages for selinux - cleanup package management, sorting package groups into package classes
45 lines
1003 B
Puppet
45 lines
1003 B
Puppet
# setup the autosyncer
|
|
class profiles::reposync::autosyncer {
|
|
|
|
# Ensure the autosyncer script is present and executable
|
|
file { '/usr/local/bin/autosyncer':
|
|
ensure => 'file',
|
|
owner => 'root',
|
|
group => 'root',
|
|
mode => '0755',
|
|
content => template('profiles/reposync/autosyncer.erb'),
|
|
require => Class['profiles::packages::reposync'],
|
|
}
|
|
|
|
# daily autosyncr service/timer
|
|
$_timer = @(EOT)
|
|
[Unit]
|
|
Description=autosyncer timer
|
|
[Timer]
|
|
OnCalendar=*-*-* 03:00:00
|
|
RandomizedDelaySec=1s
|
|
[Install]
|
|
WantedBy=timers.target
|
|
EOT
|
|
|
|
$_service = @(EOT)
|
|
[Unit]
|
|
Description=autosyncer service
|
|
[Service]
|
|
Type=oneshot
|
|
ExecStart=/usr/local/bin/autosyncer
|
|
User=root
|
|
Group=root
|
|
PermissionsStartOnly=false
|
|
PrivateTmp=no
|
|
EOT
|
|
|
|
systemd::timer { 'autosyncer.timer':
|
|
timer_content => $_timer,
|
|
service_content => $_service,
|
|
active => true,
|
|
enable => true,
|
|
require => File['/usr/local/bin/autosyncer'],
|
|
}
|
|
}
|