1
0
mirror of https://github.com/krislamo/puppet-fluentd synced 2024-09-20 04:30:36 +00:00
puppet-fluentd/manifests/repo/yum.pp
Nicanor Gutierrez e5650f47d1 Add path to exec to avoid error
Error received before: Error: Failed to apply catalog: Parameter onlyif failed on Exec[remove old GPG key]: 'rpm -qi gpg-pubkey-a12e206f-*' is not qualified and no path was specified. Please qualify the command or specify a path. at /etc/puppetlabs/code/environments/acceptance/modules/fluentd/manifests/repo/yum.pp:27
2017-07-11 11:13:23 +02:00

35 lines
871 B
Puppet

# Configure yumrepo
#
class fluentd::repo::yum (
$ensure = 'present',
$descr = 'TreasureData',
$baseurl = 'https://packages.treasuredata.com/2/redhat/$releasever/$basearch',
$enabled = '1',
$gpgcheck = '1',
$gpgkey = 'https://packages.treasuredata.com/GPG-KEY-td-agent',
) {
yumrepo { 'treasure-data':
ensure => $ensure,
descr => $descr,
baseurl => $baseurl,
enabled => $enabled,
gpgcheck => $gpgcheck,
notify => Exec['add GPG key'],
}
exec { 'add GPG key':
command => "rpm --import ${fluentd::repo::yum::gpgkey}",
path => '/bin:/usr/bin/',
refreshonly => true,
}
exec { 'remove old GPG key':
command => 'rpm -e --allmatches gpg-pubkey-a12e206f-*',
path => '/bin:/usr/bin/',
onlyif => 'rpm -qi gpg-pubkey-a12e206f-*',
notify => Exec['add GPG key'],
}
}