diff options
-rw-r--r-- | manifests/role/nas.pp | 40 |
1 files changed, 32 insertions, 8 deletions
diff --git a/manifests/role/nas.pp b/manifests/role/nas.pp index bae8b66..0d32a7d 100644 --- a/manifests/role/nas.pp +++ b/manifests/role/nas.pp @@ -84,12 +84,18 @@ class nodo::role::nas { } file { '/etc/avahi/services/ftp.service': - ensure => present, + ensure => $avahi ? { + true => present, + default => absent, + }, owner => root, group => root, mode => 0644, source => 'puppet:///modules/site_avahi/services/ftp.service', - notify => Service['avahi-daemon'], + notify => $avahi ? { + true => Service['avahi-daemon'], + default => undef, + }, } } @@ -137,12 +143,18 @@ class nodo::role::nas { } file { '/etc/avahi/services/samba.service': - ensure => present, + ensure => $avahi ? { + true => present, + default => absent, + }, owner => root, group => root, mode => 0644, source => 'puppet:///modules/site_avahi/services/samba.service', - notify => Service['avahi-daemon'], + notify => $avahi ? { + true => Service['avahi-daemon'], + default => undef, + }, } } @@ -168,12 +180,18 @@ class nodo::role::nas { } file { '/etc/avahi/services/http.service': - ensure => present, + ensure => $avahi ? { + true => present, + default => absent, + }, owner => root, group => root, mode => 0644, source => 'puppet:///modules/site_avahi/services/http.service', - notify => Service['avahi-daemon'], + notify => $avahi ? { + true => Service['avahi-daemon'], + default => undef, + }, } } @@ -201,12 +219,18 @@ class nodo::role::nas { include rsync::server file { '/etc/avahi/services/rsync.service': - ensure => present, + ensure => $avahi ? { + true => present, + default => absent, + }, owner => root, group => root, mode => 0644, source => 'puppet:///modules/site_avahi/services/rsync.service', - notify => Service['avahi-daemon'], + notify => $avahi ? { + true => Service['avahi-daemon'], + default => undef, + }, } } |