system-config/modules/asterisk/manifests/function/customdir.pp
Paul Belanger e98607775c Invert modules.conf logic
Rather then autoloading everything, we explicitly load what we need.  I
find this give the user better control of what is installed by default.

Additionally, upstream (my) puppet modules will likely expect this.

Change-Id: Ib572c54053bd5b5f9a3a513f6f8696db87ea0864
Signed-off-by: Paul Belanger <paul.belanger@polybeacon.com>
2013-07-26 13:17:55 +00:00

45 lines
869 B
Puppet

# == Define: asterisk::function::customdir
#
# This class manages the asterisk server
#
# === Examples
#
# asterisk::function::customdir { 'cdr.conf': }
#
# === Authors
#
# Paul Belanger <paul.belanger@polybeacon.com>
#
# === Copyright
#
# Copyright (C) 2012, PolyBeacon, Inc.
#
# This program is free software, distributed under the terms
# of the Apache License, Version 2.0. See the LICENSE file at
# the top of the source tree.
#
define asterisk::function::customdir(
) {
include asterisk
File {
group => 'asterisk',
mode => '0640',
owner => 'asterisk',
}
$basedir = '/etc/asterisk'
$base = "${basedir}/${name}.d"
file { $base:
ensure => directory,
force => true,
notify => Exec["asterisk-module-reload-${name}"],
purge => true,
recurse => true,
require => File[$basedir],
}
}
# vim:sw=2:ts=2:expandtab