- the archive path is no longer valid - produced a g10k rpm with rpmbuilder Reviewed-on: https://git.query.consul/unkinben/puppet-prod/pulls/304
53 lines
1.2 KiB
Puppet
53 lines
1.2 KiB
Puppet
# Class: profiles::puppet::g10k
|
|
#
|
|
class profiles::puppet::g10k (
|
|
Stdlib::Absolutepath $bin_path = '/usr/bin/g10k',
|
|
Stdlib::Absolutepath $cfg_path = '/etc/puppetlabs/r10k/r10k.yaml',
|
|
Stdlib::Absolutepath $environments_path = '/etc/puppetlabs/code/environments',
|
|
String $default_environment = 'develop',
|
|
){
|
|
|
|
package {'g10k':
|
|
ensure => 'latest',
|
|
}
|
|
|
|
file { '/opt/puppetlabs/bin/puppet-g10k':
|
|
ensure => file,
|
|
owner => 'root',
|
|
group => 'root',
|
|
mode => '0755',
|
|
content => template('profiles/puppet/g10k/puppet-g10k.erb'),
|
|
require => Package['g10k'],
|
|
}
|
|
|
|
$_timer = @(EOT)
|
|
[Unit]
|
|
Description=puppet-g10k downloader timer
|
|
[Timer]
|
|
OnCalendar=*:0/1
|
|
RandomizedDelaySec=1s
|
|
[Install]
|
|
WantedBy=timers.target
|
|
EOT
|
|
|
|
$_service = @(EOT)
|
|
[Unit]
|
|
Description=puppet-g10k downloader service
|
|
[Service]
|
|
Type=oneshot
|
|
ExecStart=/opt/puppetlabs/bin/puppet-g10k
|
|
User=root
|
|
Group=root
|
|
PermissionsStartOnly=false
|
|
PrivateTmp=no
|
|
EOT
|
|
|
|
systemd::timer { 'puppet-g10k.timer':
|
|
timer_content => $_timer,
|
|
service_content => $_service,
|
|
active => true,
|
|
enable => true,
|
|
require => File['/opt/puppetlabs/bin/puppet-g10k'],
|
|
}
|
|
}
|