aboutsummaryrefslogtreecommitdiff
path: root/manifests/server/option.pp
blob: 699985db0eb9887f5b48ef1e17861ceae8222a73 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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']
  }
}