diff options
-rw-r--r-- | manifests/init.pp | 68 |
1 files changed, 35 insertions, 33 deletions
diff --git a/manifests/init.pp b/manifests/init.pp index c5bca58..cbd21aa 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -22,43 +22,45 @@ class avahi inherits avahi::params { - package { $avahi_main: - ensure => installed, - } + if $::kernel == 'Linux' { - package { $avahi_tools: - ensure => installed, - require => Package[$avahi_main] - } + package { $avahi_main: + ensure => installed, + } - package { $avahi_mdns: - ensure => installed, - require => Package[$avahi_main] - } + package { $avahi_tools: + ensure => installed, + require => Package[$avahi_main] + } - service { $avahi_daemon: - ensure => running, - enable => true, - hasstatus => true, - require => Service['avahi_dbus'], - } + package { $avahi_mdns: + ensure => installed, + require => Package[$avahi_main] + } - service { 'avahi_dbus': - name => $avahi_dbus, - ensure => running, - enable => true, - require => Package[$avahi_mdns], - } + service { $avahi_daemon: + ensure => running, + enable => true, + hasstatus => true, + require => Service['avahi_dbus'], + } - ini_setting { "avahi-${::hostname}": - ensure => present, - path => '/etc/avahi/avahi-daemon.conf', - section => 'server', - setting => 'host-name', - key_val_separator => '=', - value => $::hostname, - notify => Service[$avahi_daemon], - require => Package[$avahi_mdns], - } + service { 'avahi_dbus': + name => $avahi_dbus, + ensure => running, + enable => true, + require => Package[$avahi_mdns], + } + ini_setting { "avahi-${::hostname}": + ensure => present, + path => '/etc/avahi/avahi-daemon.conf', + section => 'server', + setting => 'host-name', + key_val_separator => '=', + value => $::hostname, + notify => Service[$avahi_daemon], + require => Package[$avahi_mdns], + } + } } |