/usr/share/puppet/modules.available/puppet-community-mcollective/manifests/soft_include.pp is in puppet-module-puppet-community-mcollective 0.6.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | # private define - mcollective::soft_include
# Attempts to include a class which may not exist. If it does it also
# sandwiches it in between the $start and $end resources (typically anchors).
#
# This is somewhat useful as certain plugins may have specific options for
# client/server, for example the ssl securityprovider has the following classes:
# mcollective::config::common::securityprovider::ssl
# mcollective::config::client::securityprovider::ssl
# mcollective::config::server::securityprovider::ssl
#
# But the psk securityprovider only needs a single common class:
# mcollective::config::common::securityprovider::psk
#
# To avoid having empty server and client classes, instead in the
# respective common, client, and server classes we can soft_include
# mcollective::config::${role}::securityprovider::${mcollective::securityprovider}
define mcollective::soft_include($start, $end) {
# does the class exist?
if defined($name) {
# declare it
class { $name:
require => $start,
before => $end,
}
}
}
|