teamspeak: Convert to parameterized class
This commit is contained in:
parent
bf315c542d
commit
d40e4f6d1c
1 changed files with 8 additions and 6 deletions
|
@ -1,13 +1,13 @@
|
|||
# Install TeamSpeak server.
|
||||
#
|
||||
# === Global variables
|
||||
# === Parameters
|
||||
#
|
||||
# $teamspeak_license:
|
||||
# $license:
|
||||
# Teamspeak license file source.
|
||||
#
|
||||
class teamspeak {
|
||||
class teamspeak($package=undef, $license=undef) {
|
||||
|
||||
if !$teamspeak_package {
|
||||
if ! $package {
|
||||
case $::architecture {
|
||||
"amd64","x86_64": {
|
||||
if $teamspeak64_package_latest {
|
||||
|
@ -24,6 +24,8 @@ class teamspeak {
|
|||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$teamspeak_package = $package
|
||||
}
|
||||
|
||||
case $::architecture {
|
||||
|
@ -69,13 +71,13 @@ class teamspeak {
|
|||
notify => Service["teamspeak"],
|
||||
}
|
||||
|
||||
if $teamspeak_license {
|
||||
if $license {
|
||||
file { "/srv/teamspeak/licensekey.dat":
|
||||
ensure => present,
|
||||
mode => "0600",
|
||||
owner => "teamspeak",
|
||||
group => "teamspeak",
|
||||
source => $teamspeak_license,
|
||||
source => $license,
|
||||
require => File["/srv/teamspeak"],
|
||||
notify => Service["teamspeak"],
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue