Defined Type: scl::collection
- Defined in:
- manifests/collection.pp
Overview
Software Collection install helper.
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'manifests/collection.pp', line 17
define scl::collection (
String $collection = $title,
Boolean $enable = false,
Enum['present', 'absent'] $ensure = 'present',
) {
if ! defined(Class['::scl']) {
fail('You must include the scl base class before using any scl defined resources')
}
package { $collection:
ensure => $ensure,
}
if $ensure == 'present' and $enable {
file { "/etc/profile.d/scl-${collection}.sh":
ensure => file,
owner => 0,
group => 0,
mode => '0644',
content => @("EOS"/L),
source scl_source enable ${collection}
| EOS
require => Package[$collection],
}
} else {
file { "/etc/profile.d/scl-${collection}.sh":
ensure => absent,
}
}
}
|