Skip to content

Instantly share code, notes, and snippets.

@trlinkin
Last active August 29, 2015 14:05
Show Gist options
  • Select an option

  • Save trlinkin/f3e3ed2e7711d3d9305d to your computer and use it in GitHub Desktop.

Select an option

Save trlinkin/f3e3ed2e7711d3d9305d to your computer and use it in GitHub Desktop.
class puppet_enterprise_agent_upgrade (
$version,
$el_version = $::lsbmajdistrelease,
) {
yumrepo {'puppet_enterprise_local':
descr => 'Puppet Labs PE Packages $releasever - $basearch',
baseurl => "https://puppetmaster.company.com:8140/packages/${version}/el-${el_version}-x86_64",
enabled => 1,
gpgcheck => 1,
gpgkey => 'https://puppetmaster.company.com:8140/packages/GPG-KEY-puppetlabs',
}
package {'pe-agent':
ensure => $version,
require => File_line ['sslverify_puppet_enterprise'],
}
# Puppet < 3.0 does not support this option in the yumrepo type, manual workaround!
file_line { 'sslverify_puppet_enterprise':
path => '/etc/yum.repos.d/puppet_enterprise_local.repo',
line => 'sslverify=0',
require => Yumrepo['puppet_enterprise_local'],
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment