Added port autodiscovery for avahi services.
This commit is contained in:
parent
9edbc6ae12
commit
78d29ea44f
2 changed files with 32 additions and 1 deletions
|
@ -47,9 +47,14 @@ class avahi::daemon {
|
|||
# type => "_ssh._tcp",
|
||||
# }
|
||||
#
|
||||
define avahi::service($type, $port, $description = "%h", $ensure = "present", $txt = []) {
|
||||
define avahi::service($type, $port = "AUTO", $description = "%h", $ensure = "present", $txt = []) {
|
||||
|
||||
$srvtype = $type
|
||||
if $port == "AUTO" {
|
||||
$realport = avahi_service_port($srvtype)
|
||||
} else {
|
||||
$realport = $port
|
||||
}
|
||||
|
||||
file { "/etc/avahi/services/${name}.service":
|
||||
ensure => $ensure,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue