Defined Type: avahi::service
- Defined in:
- manifests/service.pp
Overview
Statically define a service in Avahi.
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'manifests/service.pp', line 103
define avahi::service (
String $description,
Array[Avahi::Record, 1] $services,
Optional[Boolean] $replace_wildcards = undef,
String $service = $title,
) {
include avahi
$validate_cmd = $avahi::validate ? {
true => "${avahi::xmllint} --path ${avahi::dtd_dir} --valid --noout %",
default => undef,
}
file { "${avahi::conf_dir}/services/${service}.service":
ensure => file,
owner => 0,
group => 0,
mode => '0644',
content => template("${module_name}/service.erb"),
validate_cmd => $validate_cmd,
}
}
|