aboutsummaryrefslogtreecommitdiff
path: root/manifests/server/option.pp
blob: 0b34edb793ddebb85802040529bc20d0679f20c3 (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']
  }
}