aboutsummaryrefslogtreecommitdiff
path: root/manifests/server/option.pp
blob: bf491e8adf95bfb07e18fae3dae1b9fbbbd8b19d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# == Define samba::server::option
#
define samba::server::option ( $value = '' ) {
  $incl    = $samba::server::incl
  $context = $samba::server::context
  $target  = $samba::server::target

  $changes = $value ? {
    ''      => "rm ${target}/${name}",
    default => "set \"${target}/${name}\" \"${value}\"",
  }

  augeas { "samba-${name}":
    incl    => $incl,
    lens    => 'Samba.lns',
    context => $context,
    changes => $changes,
    require => Augeas['global-section'],
    notify  => Class['Samba::Server::Service']
  }
}