Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the yumconfig configurable via hiera #3

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ Notes

* Only tested on CentOS 6.3 x86_64 on a HP DL140 G2.

Requirements
-----
* SNMP (https://github.com/razorsedge/puppet-snmp)

Issues
------

Expand Down
39 changes: 32 additions & 7 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,26 @@
# Ensure if present or absent.
# Default: present
#
# [*yum_server*]
# Servername where the repo is
# Default: 'http://downloads.linux.hp.com'
#
# [*yum_os*]
# OS-Name for the Repopath
# Default: Depending on the OS
#
# [*yum_path*]
# Path on the Server to the repos
# Default: '/SDR/downloads/proliantsupportpack'
#
# [*yum_priority*]
#
# Default: '50'
#
# [*yum_project*]
#
# Default: '0'
#
# === Actions:
#
# Installs the SMH user and group as well as the YUM repository.
Expand All @@ -37,9 +57,14 @@
# Copyright (C) 2012 Mike Arnold, unless otherwise noted.
#
class psp (
$ensure = 'present',
$smh_gid = $psp::params::gid,
$smh_uid = $psp::params::uid
$ensure = 'present',
$smh_gid = $psp::params::gid,
$smh_uid = $psp::params::uid,
$yum_server = $psp::params::yum_server,
$yum_os = $psp::params::yum_os,
$yum_path = $psp::params::yum_path,
$yum_priority = $psp::params::yum_priority,
$yum_project = $psp::params::yum_project,
) inherits psp::params {

case $ensure {
Expand Down Expand Up @@ -73,10 +98,10 @@
descr => 'HP Software Delivery Repository for Proliant Support Pack',
enabled => 1,
gpgcheck => 1,
gpgkey => "${psp::params::yum_server}${psp::params::yum_path}/GPG-KEY-ProLiantSupportPack",
baseurl => "${psp::params::yum_server}${psp::params::yum_path}/${psp::params::yum_os}/\$releasever/packages/\$basearch/",
priority => $psp::params::yum_priority,
protect => $psp::params::yum_protect,
gpgkey => "${yum_server}${yum_path}/GPG-KEY-ProLiantSupportPack",
baseurl => "${yum_server}${yum_path}/${yum_os}/\$releasever/packages/\$basearch/",
priority => $yum_priority,
protect => $yum_protect,
}
}
# If we are not on HP hardware, do not do anything.
Expand Down
2 changes: 1 addition & 1 deletion manifests/snmp.pp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# Copyright (C) 2012 Mike Arnold, unless otherwise noted.
#
class psp::snmp inherits snmp::server {
class psp::snmp inherits snmp {
# TODO: This is a total hack. Perhaps move this to Class['snmp::server::psp']?
File['snmpd.conf'] {
mode => '0660',
Expand Down