Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #7 from jbartko/master

add g++ for Red Hat
  • Loading branch information...
commit 7adf78f042ecbf0c0a07dbd2951269daa90e5099 2 parents 3c7dbe6 + 8309578
Ashley Penney authored
Showing with 11 additions and 10 deletions.
  1. +5 −6 manifests/init.pp
  2. +6 −4 manifests/params.pp
View
11 manifests/init.pp
@@ -11,11 +11,10 @@
#
# Sample Usage:
#
-class gcc {
-
- include gcc::params
-
- package { $gcc::params::gcc_package:
- ensure => installed
+class gcc(
+ $gcc_package = $gcc::params::gcc_package,
+) inherits gcc::params {
+ package { $gcc_package:
+ ensure => installed
}
}
View
10 manifests/params.pp
@@ -10,14 +10,16 @@
#
# Sample Usage:
#
-class gcc::params{
-
+class gcc::params {
case $::osfamily {
'RedHat': {
- $gcc_package = 'gcc'
+ $gcc_package = [ 'gcc', 'gcc-c++' ]
}
'Debian': {
- $gcc_package = [ 'gcc', 'build-essential' ]
+ $gcc_package = [ 'gcc', 'build-essential' ]
+ }
+ default: {
+ fail("Class['gcc::params']: Unsupported osfamily: ${::osfamily}")
}
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.