aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jahn <ajjahn@gmail.com>2015-04-11 13:32:43 -0400
committerAdam Jahn <ajjahn@gmail.com>2015-04-11 13:32:43 -0400
commit30ba71f6c8316e7f8f2336949a4d40c2b00c5989 (patch)
treedfefb60ba6a91721591b2ba6171bd1637e8cd87b
parent99b37d9904fd2ac9b587045ddf76b7458a19a559 (diff)
downloadpuppet-samba-30ba71f6c8316e7f8f2336949a4d40c2b00c5989.tar.gz
puppet-samba-30ba71f6c8316e7f8f2336949a4d40c2b00c5989.tar.bz2
lint formatting
-rw-r--r--manifests/server.pp8
-rw-r--r--manifests/server/ads.pp14
-rw-r--r--manifests/server/option.pp6
-rw-r--r--manifests/server/service.pp10
-rw-r--r--manifests/server/user.pp20
5 files changed, 28 insertions, 30 deletions
diff --git a/manifests/server.pp b/manifests/server.pp
index 31589e0..09a1b27 100644
--- a/manifests/server.pp
+++ b/manifests/server.pp
@@ -17,8 +17,8 @@ class samba::server($interfaces = '',
include samba::server::service
$incl = '/etc/samba/smb.conf'
- $context = "/files/etc/samba/smb.conf"
- $target = "target[. = 'global']"
+ $context = '/files/etc/samba/smb.conf'
+ $target = 'target[. = 'global']'
augeas { 'global-section':
incl => $incl,
@@ -50,7 +50,7 @@ class samba::server($interfaces = '',
path => '/sbin/check_samba_user',
owner => root,
group => root,
- mode => "0755",
+ mode => '0755',
content => template("${module_name}/check_samba_user"),
}
@@ -59,7 +59,7 @@ class samba::server($interfaces = '',
path => '/sbin/add_samba_user',
owner => root,
group => root,
- mode => "0755",
+ mode => '0755',
content => template("${module_name}/add_samba_user"),
}
diff --git a/manifests/server/ads.pp b/manifests/server/ads.pp
index 3d44af6..0b7e2a7 100644
--- a/manifests/server/ads.pp
+++ b/manifests/server/ads.pp
@@ -30,7 +30,7 @@ class samba::server::ads($ensure = present,
default => 'krb5-user',
}
- if $osfamily == "RedHat" {
+ if $osfamily == 'RedHat' {
if $operatingsystemrelease =~ /^6\./ {
$winbind_package = 'samba-winbind'
} else {
@@ -82,10 +82,10 @@ class samba::server::ads($ensure = present,
$changes=$nsswitch ? {
true => [
- "set database[. = 'passwd']/service[1] compat",
- "set database[. = 'passwd']/service[2] winbind",
- "set database[. = 'group']/service[1] compat",
- "set database[. = 'group']/service[2] winbind",
+ 'set database[. = 'passwd']/service[1] compat',
+ 'set database[. = 'passwd']/service[2] winbind',
+ 'set database[. = 'group']/service[1] compat',
+ 'set database[. = 'group']/service[2] winbind',
],
false => [
"rm /files/${nss_file}/database[. = 'passwd']/service[. = 'winbind']",
@@ -103,7 +103,7 @@ class samba::server::ads($ensure = present,
path => '/sbin/verify_active_directory',
owner => root,
group => root,
- mode => "0755",
+ mode => '0755',
content => template("${module_name}/verify_active_directory.erb"),
require => [ Package[$krb5_user_package, $winbind_package, 'expect'],
Augeas['samba-realm', 'samba-security', 'samba-winbind enum users',
@@ -116,7 +116,7 @@ class samba::server::ads($ensure = present,
path => '/sbin/configure_active_directory',
owner => root,
group => root,
- mode => "0755",
+ mode => '0755',
content => template("${module_name}/configure_active_directory.erb"),
require => [ Package[$krb5_user_package, $winbind_package, 'expect'],
Augeas['samba-realm', 'samba-security', 'samba-winbind enum users',
diff --git a/manifests/server/option.pp b/manifests/server/option.pp
index 699985d..0b34edb 100644
--- a/manifests/server/option.pp
+++ b/manifests/server/option.pp
@@ -4,11 +4,11 @@ define samba::server::option ( $value = '' ) {
$target = $samba::server::target
$changes = $value ? {
- '' => "rm ${target}/$name",
- default => "set \"${target}/$name\" \"$value\"",
+ '' => "rm ${target}/${name}",
+ default => "set \"${target}/${name}\" \"${value}\"",
}
- augeas { "samba-$name":
+ augeas { "samba-${name}":
incl => $incl,
lens => 'Samba.lns',
context => $context,
diff --git a/manifests/server/service.pp b/manifests/server/service.pp
index 9ad5fb0..fdd9104 100644
--- a/manifests/server/service.pp
+++ b/manifests/server/service.pp
@@ -7,8 +7,8 @@ class samba::server::service ($ensure = running, $enable = true) {
'Debian': {
case $::operatingsystem{
'Debian': { $service_name = 'samba' }
- 'Ubuntu': { $service_name = 'smbd'}
- default: { $service_name='samba'}
+ 'Ubuntu': { $service_name = 'smbd' }
+ default: { $service_name = 'samba' }
}
}
'Gentoo': { $service_name = 'samba' }
@@ -20,13 +20,13 @@ class samba::server::service ($ensure = running, $enable = true) {
'Linux': {
case $::operatingsystem {
'Gentoo': { $service_name = 'samba' }
- default: { fail("$::operatingsystem is not supported by this module.") }
+ default: { fail("${::operatingsystem} is not supported by this module.") }
}
}
- default: { fail("$::osfamily is not supported by this module.") }
+ default: { fail("${::osfamily} is not supported by this module.") }
}
- service { "$service_name" :
+ service { $service_name :
ensure => $ensure,
hasstatus => true,
hasrestart => true,
diff --git a/manifests/server/user.pp b/manifests/server/user.pp
index 2cffe3b..e3d84cc 100644
--- a/manifests/server/user.pp
+++ b/manifests/server/user.pp
@@ -1,13 +1,11 @@
define samba::server::user(
- $user_name = $name ,
- $password ,
- ) {
- exec { "add smb account for ${user_name}":
- command => "/sbin/add_samba_user '${user_name}' '${password}'" ,
- unless => "/sbin/check_samba_user '${user_name}'" ,
- require => [
- User["${user_name}"]
- ] ,
- notify => Class['samba::server::service']
- }
+ $password,
+ $user_name = $name,
+) {
+ exec { "add smb account for ${user_name}":
+ command => "/sbin/add_samba_user '${user_name}' '${password}'" ,
+ unless => "/sbin/check_samba_user '${user_name}'" ,
+ require => [ User[$user_name] ],
+ notify => Class['samba::server::service']
+ }
}