Files
puppet-pacemaker/manifests/contain.pp
Tobias Urdin b501c08640 Convert all class usage to relative names
Change-Id: I81554d6ab7349a068066a68801124189663490dd
2020-09-01 14:44:22 +02:00

18 lines
525 B
Puppet

# == Class: pacemaker::contain
#
# Work around this bug https://github.com/puppetlabs/puppet/pull/2633
# in puppet where contains cannot have a absolute class as a
# parameter. It has not been fixed for 3.6 which is tested in the CI.
#
# === Parameters
#
# [*class_name*]
# The relative name of the class to contain.
# Default to $name
define pacemaker::contain ($class_name='') {
$k = pick($class_name, $name)
validate_re($k, '^[^:][^:]', "The class name must be relative not ${k}")
include "::${k}"
contain $k
}