aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-05-30 23:03:46 -0300
committerSilvio Rhatto <rhatto@riseup.net>2013-05-30 23:03:46 -0300
commitd3658027fae14a037d99de27916b777ded23c944 (patch)
tree08ace0aaa0db863582024b3dd161a0d4f2096d11
parent9d0bb54276ee846440a71798c65941502a1c10db (diff)
downloadpuppet-nodo-d3658027fae14a037d99de27916b777ded23c944.tar.gz
puppet-nodo-d3658027fae14a037d99de27916b777ded23c944.tar.bz2
Checking if avahi is enabled at nodo::role::nas
-rw-r--r--manifests/role/nas.pp40
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,
+ },
}
}