]> gitweb.fluxo.info Git - puppet-sshd.git/commitdiff
style fixes
authorMichael Moll <kvedulv@kvedulv.de>
Sat, 2 Feb 2013 23:30:54 +0000 (00:30 +0100)
committerMichael Moll <kvedulv@kvedulv.de>
Sat, 2 Feb 2013 23:30:54 +0000 (00:30 +0100)
silence puppet-lint

manifests/base.pp
manifests/client/base.pp
manifests/debian.pp
manifests/init.pp
manifests/linux.pp
manifests/nagios.pp
manifests/openbsd.pp
manifests/redhat.pp
manifests/ssh_authorized_key.pp

index 4001985a7acd3bacf563b85805debcedc885eb0d..ef066e0d1871ca74dac7eb36160abf2ff487c1ba 100644 (file)
@@ -1,12 +1,17 @@
 class sshd::base {
+
+  $sshd_config_content = $::lsbdistcodename ? {
+    ''      => template("sshd/sshd_config/${::operatingsystem}.erb"),
+    default => template ("sshd/sshd_config/${::operatingsystem}_${::lsbdistcodename}.erb"),
+  }
+
   file { 'sshd_config':
-    path => '/etc/ssh/sshd_config',
-    content => $::lsbdistcodename ? {
-      '' => template("sshd/sshd_config/${::operatingsystem}.erb"),
-      default => template ("sshd/sshd_config/${::operatingsystem}_${::lsbdistcodename}.erb"),
-    },
-    notify => Service[sshd],
-    owner => root, group => 0, mode => 600;
+    path    => '/etc/ssh/sshd_config',
+    content => $sshd_config_content,
+    notify  => Service[sshd],
+    owner   => root,
+    group   => 0,
+    mode    => '0600';
   }
 
   # Now add the key, if we've got one
@@ -14,28 +19,28 @@ class sshd::base {
     '': { info("no sshrsakey on ${::fqdn}") }
     default: {
       @@sshkey{$::fqdn:
-        tag    => "fqdn",
+        ensure => present,
+        tag    => 'fqdn',
         type   => ssh-rsa,
         key    => $::sshrsakey,
-        ensure => present,
       }
       # In case the node has uses a shared network address,
       # we don't define a sshkey resource using an IP address
-      if $sshd::shared_ip == "no" {
+      if $sshd::shared_ip == 'no' {
         @@sshkey{$::ipaddress:
-          tag    => "ipaddress",
+          ensure => present,
+          tag    => 'ipaddress',
           type   => ssh-rsa,
           key    => $::sshrsakey,
-          ensure => present,
         }
       }
     }
   }
   service{'sshd':
-    name => 'sshd',
-    enable => true,
-    ensure => running,
+    ensure    => running,
+    name      => 'sshd',
+    enable    => true,
     hasstatus => true,
-    require => File[sshd_config],
+    require   => File[sshd_config],
   }
 }
index c2580c1f6a30f5a9ff37402af3383a766fbdd991..6687d657cec76a523a1e9bb60c09ad842a4bf3b7 100644 (file)
@@ -1,12 +1,14 @@
 class sshd::client::base {
   # this is needed because the gid might have changed
   file { '/etc/ssh/ssh_known_hosts':
-    mode => 0644, owner => root, group => 0;
+    mode  => '0644',
+    owner => root,
+    group => 0;
   }
 
   # Now collect all server keys
   case $sshd::client::shared_ip {
     no:  { Sshkey <<||>> }
-    yes: { Sshkey <<| tag == "fqdn" |>> }
+    yes: { Sshkey <<| tag == fqdn |>> }
   }
 }
index 45eb9018957c903ad45a0bf7dc4caa165bcb3f95..ced5db7380a7d5ead1e77020e254d767303d123f 100644 (file)
@@ -8,14 +8,14 @@ class sshd::debian inherits sshd::linux {
   }
 
   $sshd_restartandstatus = $::lsbdistcodename ? {
-    etch => false,
+    etch    => false,
     default => true
   }
 
   Service[sshd]{
-    name => 'ssh',
-    pattern => 'sshd',
-    hasstatus => $sshd_restartandstatus,
+    name       => 'ssh',
+    pattern    => 'sshd',
+    hasstatus  => $sshd_restartandstatus,
     hasrestart => $sshd_restartandstatus,
   }
 }
index 4d66b819a56d7af8e45248b468b8a3dec98972d3..f12918b62489e91a98b4819e5e3c065d6abd56b2 100644 (file)
@@ -37,8 +37,8 @@ class sshd(
 ) {
 
   class{'sshd::client':
-    shared_ip => $sshd::shared_ip,
-    ensure_version => $sshd::ensure_version,
+    shared_ip        => $sshd::shared_ip,
+    ensure_version   => $sshd::ensure_version,
     manage_shorewall => $manage_shorewall,
   }
 
@@ -58,7 +58,7 @@ class sshd(
 
   if $manage_shorewall {
     class{'shorewall::rules::ssh':
-      ports => $ports,
+      ports  => $ports,
       source => $shorewall_source
     }
   }
index f071adac390895a48be1b53533d5092b87ab381c..8628ff5e0ad8592f2200ebbd4b90ae4383f241ea 100644 (file)
@@ -1,5 +1,5 @@
 class sshd::linux inherits sshd::base {
-  package{openssh:
+  package{'openssh':
     ensure => $sshd::ensure_version,
   }
   File[sshd_config]{
index ef5fe104ed4139a326a2ef6f02c958da2cfd9bfc..6921de91bee0f451bd3b3c8f9f3016fc02839818 100644 (file)
@@ -5,18 +5,18 @@ define sshd::nagios(
 ) {
   $real_port = $port ? {
     'absent' => $name,
-    default => $port,
+    default  => $port,
   }
   case $check_hostname {
     'absent': {
       nagios::service{"ssh_port_${name}":
-        ensure => $ensure,
+        ensure        => $ensure,
         check_command => "check_ssh_port!${real_port}"
       }
     }
     default: {
       nagios::service{"ssh_port_host_${name}":
-        ensure => $ensure,
+        ensure        => $ensure,
         check_command => "check_ssh_port_host!${real_port}!${check_hostname}"
       }
     }
index f1379d726c9eaf974f7c9b83176c8212abb3424c..1ad37cc72d96e9c9c0c24ec8bed5901733a67bb7 100644 (file)
@@ -1,8 +1,8 @@
 class sshd::openbsd inherits sshd::base {
   Service[sshd]{
-    restart => '/bin/kill -HUP `/bin/cat /var/run/sshd.pid`',
-    stop => '/bin/kill `/bin/cat /var/run/sshd.pid`',
-    start => '/usr/sbin/sshd',
+    restart   => '/bin/kill -HUP `/bin/cat /var/run/sshd.pid`',
+    stop      => '/bin/kill `/bin/cat /var/run/sshd.pid`',
+    start     => '/usr/sbin/sshd',
     hasstatus => false,
   }
 }
index e9bf1d1d9d0f734b17f5a9b21c7e3b2cd7cdc556..d7201774d93f3d966b936a30ed296b5645ecf8d0 100644 (file)
@@ -1,5 +1,5 @@
-class sshd::redhat inherits sshd::linux { 
-    Package[openssh]{ 
-        name => 'openssh-server', 
-    } 
+class sshd::redhat inherits sshd::linux {
+    Package[openssh]{
+        name => 'openssh-server',
+    }
 }
index 40649b0b3758f91db1b6e9fe56654c494103b1a0..7201f8b9f123e3eaf64695f16d61720a13cf0ef9 100644 (file)
@@ -13,8 +13,8 @@ define sshd::ssh_authorized_key(
   }
 
   $real_user = $user ? {
-    false => $name,
-    '' => $name,
+    false   => $name,
+    ''      => $name,
     default => $user,
   }
 
@@ -31,14 +31,14 @@ define sshd::ssh_authorized_key(
   }
   ssh_authorized_key{$name:
     ensure => $ensure,
-    type => $type,
-    key => $key,
-    user => $real_user,
+    type   => $type,
+    key    => $key,
+    user   => $real_user,
     target => $real_target,
   }
 
   case $options {
-    'absent': { info("not setting any option for ssh_authorized_key: $name") }
+    'absent': { info("not setting any option for ssh_authorized_key: ${name}") }
     default: {
       Ssh_authorized_key[$name]{
         options => $options,