Project

General

Profile

Download (702 Bytes) Statistics
| Branch: | Tag: | Revision:
# Installs the package for a given Foreman plugin
define foreman::plugin(
$package = "${foreman::plugin_prefix}${title}",
$config_file = "${foreman::plugin_config_dir}/foreman_${title}.yaml",
$config = '',
) {
# Debian gem2deb converts underscores to hyphens
case $::osfamily {
'Debian': {
$real_package = regsubst($package,'_','-','G')
}
default: {
$real_package = $package
}
}
package { $real_package:
ensure => installed,
}

if $config {
file { $config_file:
ensure => file,
owner => 'root',
group => 'root',
mode => '0644',
content => $config,
require => Package[$real_package],
}
}
}
(8-8/12)