Tim Landscheidt has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/124001

Change subject: Tools: Remove lint
......................................................................

Tools: Remove lint

This leaves a few spots where puppet-lint complains about lines with
more than 80 characters, but changing those just for the sake of it
would be cumbersome and needs to be addressed by a proper refactoring.

Change-Id: Iac4fa7cedcb17a01fe99099c0305dc24c2c5017e
---
M modules/toollabs/manifests/bastion.pp
M modules/toollabs/manifests/execnode.pp
M modules/toollabs/manifests/gridnode.pp
M modules/toollabs/manifests/hba.pp
M modules/toollabs/manifests/infrastructure.pp
M modules/toollabs/manifests/init.pp
M modules/toollabs/manifests/mailrelay.pp
M modules/toollabs/manifests/master.pp
M modules/toollabs/manifests/redis.pp
M modules/toollabs/manifests/shadow.pp
M modules/toollabs/manifests/submit.pp
M modules/toollabs/manifests/syslog.pp
M modules/toollabs/manifests/webnode.pp
M modules/toollabs/manifests/webproxy.pp
14 files changed, 59 insertions(+), 65 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/01/124001/1

diff --git a/modules/toollabs/manifests/bastion.pp 
b/modules/toollabs/manifests/bastion.pp
index fc828cc..26d1ae7 100644
--- a/modules/toollabs/manifests/bastion.pp
+++ b/modules/toollabs/manifests/bastion.pp
@@ -11,7 +11,7 @@
 #
 # Sample Usage:
 #
-class toollabs::bastion($gridmaster) inherits toollabs {
+class toollabs::bastion($gridmaster = undef) inherits toollabs {
     include toollabs::exec_environ,
         toollabs::dev_environ,
         toollabs::gridnode
@@ -33,15 +33,15 @@
         mode   => '0755',
         owner  => 'root',
         group  => 'root',
-        source => 
"puppet:///modules/toollabs/40-${instanceproject}-bastion-banner",
+        source => 
"puppet:///modules/toollabs/40-${::instanceproject}-bastion-banner",
     }
 
-    file { "${store}/submithost-${::fqdn}":
+    file { "${toollabs::store}/submithost-${::fqdn}":
         ensure  => file,
         owner   => 'root',
         group   => 'root',
         mode    => '0444',
-        require => File[$store],
+        require => File[$toollabs::store],
         content => "${::ipaddress}\n",
     }
 
diff --git a/modules/toollabs/manifests/execnode.pp 
b/modules/toollabs/manifests/execnode.pp
index 14b03c4..34e9109 100644
--- a/modules/toollabs/manifests/execnode.pp
+++ b/modules/toollabs/manifests/execnode.pp
@@ -11,7 +11,7 @@
 #
 # Sample Usage:
 #
-class toollabs::execnode($gridmaster) inherits toollabs {
+class toollabs::execnode($gridmaster = undef) inherits toollabs {
     include toollabs::exec_environ,
         toollabs::gridnode
 
@@ -20,7 +20,7 @@
     }
 
     class { 'toollabs::hba':
-        store => $store,
+        store => $toollabs::store,
     }
 
     file { '/etc/update-motd.d/40-exechost-banner':
@@ -28,18 +28,17 @@
         mode   => '0755',
         owner  => 'root',
         group  => 'root',
-        source => 
"puppet:///modules/toollabs/40-${instanceproject}-exechost-banner",
+        source => 
"puppet:///modules/toollabs/40-${::instanceproject}-exechost-banner",
     }
 
-    file { "${store}/execnode-${::fqdn}":
+    file { "${toollabs::store}/execnode-${::fqdn}":
         ensure  => file,
         owner   => 'root',
         group   => 'root',
         mode    => '0444',
-        require => File[$store],
+        require => File[$toollabs::store],
         content => "${::ipaddress}\n",
     }
 
     # TODO: grid node setup
 }
-
diff --git a/modules/toollabs/manifests/gridnode.pp 
b/modules/toollabs/manifests/gridnode.pp
index 4d09dac..0f4da43 100644
--- a/modules/toollabs/manifests/gridnode.pp
+++ b/modules/toollabs/manifests/gridnode.pp
@@ -10,9 +10,9 @@
 #
 class toollabs::gridnode inherits toollabs {
 
-    file { "${sysdir}/gridengine":
+    file { "${toollabs::sysdir}/gridengine":
         ensure  => directory,
-        require => File[$sysdir],
+        require => File[$toollabs::sysdir],
     }
 
     file { '/var/lib/gridengine':
@@ -22,12 +22,12 @@
     mount { '/var/lib/gridengine':
         ensure  => mounted,
         atboot  => False,
-        device  => "${sysdir}/gridengine",
+        device  => "${toollabs::sysdir}/gridengine",
         fstype  => none,
         options => 'rw,bind',
-        require => File["${sysdir}/gridengine", '/var/lib/gridengine'],
+        require => File["${toollabs::sysdir}/gridengine",
+                        '/var/lib/gridengine'],
         before  => Package['gridengine-common'],
     }
 
 }
-
diff --git a/modules/toollabs/manifests/hba.pp 
b/modules/toollabs/manifests/hba.pp
index a2ff805..2056fe7 100644
--- a/modules/toollabs/manifests/hba.pp
+++ b/modules/toollabs/manifests/hba.pp
@@ -10,7 +10,7 @@
 #
 # Sample Usage:
 #
-class toollabs::hba($store) {
+class toollabs::hba($store = undef) {
 
     file { '/usr/local/sbin/project-make-shosts':
         ensure => file,
@@ -54,4 +54,3 @@
     }
 
 }
-
diff --git a/modules/toollabs/manifests/infrastructure.pp 
b/modules/toollabs/manifests/infrastructure.pp
index 6147bb3..a13bfda 100644
--- a/modules/toollabs/manifests/infrastructure.pp
+++ b/modules/toollabs/manifests/infrastructure.pp
@@ -19,7 +19,7 @@
         mode   => '0755',
         owner  => 'root',
         group  => 'root',
-        source => 
"puppet:///modules/toollabs/40-${instanceproject}-infrastructure-banner",
+        source => 
"puppet:///modules/toollabs/40-${::instanceproject}-infrastructure-banner",
     }
 
     # Infrastructure instances are limited to an (arbitrarily picked) local
@@ -29,4 +29,3 @@
         content => "-:ALL EXCEPT (tools.admin) root:ALL\n",
     }
 }
-
diff --git a/modules/toollabs/manifests/init.pp 
b/modules/toollabs/manifests/init.pp
index 6fa1943..fb2e10f 100644
--- a/modules/toollabs/manifests/init.pp
+++ b/modules/toollabs/manifests/init.pp
@@ -16,8 +16,8 @@
     include labs_lvm
 
     $sysdir = '/data/project/.system'
-    $store  = "$sysdir/store"
-    $repo   = "$sysdir/deb"
+    $store  = "${sysdir}/store"
+    $repo   = "${sysdir}/deb"
 
     #
     # The $store is an incredibly horrid workaround the fact that we cannot
@@ -33,7 +33,7 @@
         ensure  => directory,
         owner   => 'root',
         group   => 'tools.admin',
-        mode    => '02775',
+        mode    => '2775',
         require => Mount['/data/project'],
     }
 
@@ -51,11 +51,11 @@
         group   => 'root',
         mode    => '0444',
         require => File[$store],
-        content => "[${::fqdn}]:*,[${::ipaddress}]:* ssh-rsa 
${::sshrsakey}\n${::fqdn} ssh-rsa ${::sshrsakey}\n",
+        content => "[${::fqdn}]:*,[${::ipaddress}]:* ssh-rsa 
${::sshrsakey}${::fqdn} ssh-rsa ${::sshrsakey}\n",
     }
 
     exec { 'make_known_hosts':
-        command => "/bin/cat $store/hostkey-* >/etc/ssh/ssh_known_hosts~",
+        command => "/bin/cat ${store}/hostkey-* >/etc/ssh/ssh_known_hosts~",
         require => File[$store],
     }
 
@@ -120,9 +120,9 @@
     file { '/etc/apt/trusted.gpg.d/mariadb.gpg':
         ensure => file,
         source => 'puppet:///modules/toollabs/mariadb.gpg',
-        mode => '0444',
-        owner => 'root',
-        group => 'root',
+        mode   => '0444',
+        owner  => 'root',
+        group  => 'root',
     }
 
     File <| title == '/etc/exim4/exim4.conf' |> {
diff --git a/modules/toollabs/manifests/mailrelay.pp 
b/modules/toollabs/manifests/mailrelay.pp
index a07fcc9..da0e32d 100644
--- a/modules/toollabs/manifests/mailrelay.pp
+++ b/modules/toollabs/manifests/mailrelay.pp
@@ -10,7 +10,8 @@
 #
 # Sample Usage:
 #
-class toollabs::mailrelay($maildomain, $gridmaster) inherits toollabs {
+class toollabs::mailrelay($maildomain = undef,
+                          $gridmaster = undef) inherits toollabs {
     include toollabs::infrastructure,
         toollabs::gridnode
 
@@ -18,12 +19,12 @@
         gridmaster => $gridmaster,
     }
 
-    file { "${store}/mail-relay":
+    file { "${toollabs::store}/mail-relay":
         ensure  => file,
         owner   => 'root',
         group   => 'root',
         mode    => '0444',
-        require => File[$store],
+        require => File[$toollabs::store],
         content => template('toollabs/mail-relay.erb'),
     }
 
@@ -47,7 +48,8 @@
         source  => undef,
         content => template('toollabs/exim4.conf.erb'),
         notify  => Service['exim4'],
-        require => File['/usr/local/sbin/localuser', 
'/usr/local/sbin/maintainers'],
+        require => File['/usr/local/sbin/localuser',
+                        '/usr/local/sbin/maintainers'],
     }
 
     File <| title == '/etc/default/exim4' |> {
@@ -71,4 +73,3 @@
         require => File['/usr/local/bin/collect_exim_stats_via_gmetric'],
     }
 }
-
diff --git a/modules/toollabs/manifests/master.pp 
b/modules/toollabs/manifests/master.pp
index 584786c..cd702ab 100644
--- a/modules/toollabs/manifests/master.pp
+++ b/modules/toollabs/manifests/master.pp
@@ -24,22 +24,21 @@
     # any singleton instance.
     #
 
-    file { $repo:
+    file { $toollabs::repo:
         ensure  => directory,
         owner   => 'tools.admin',
         group   => 'tools.admin',
         mode    => '0755',
-        require => File[$sysdir],
+        require => File[$toollabs::sysdir],
     }
 
-    file { "${repo}/update-repo.sh":
+    file { "${toollabs::repo}/update-repo.sh":
         ensure  => file,
         owner   => 'tools.admin',
         group   => 'tools.admin',
         mode    => '0550',
-        require => File[$repo],
+        require => File[$toollabs::repo],
         source  => 'puppet:///modules/toollabs/update-repo.sh',
     }
 
 }
-
diff --git a/modules/toollabs/manifests/redis.pp 
b/modules/toollabs/manifests/redis.pp
index 597430e..f1dd13a 100644
--- a/modules/toollabs/manifests/redis.pp
+++ b/modules/toollabs/manifests/redis.pp
@@ -25,16 +25,16 @@
         # Disable the following commands, to try to limit people from
         # Trampling on each others' keys
         rename_commands => {
-            "CONFIG"    => "",
-            "FLUSHALL"  => "",
-            "FLUSHDB"   => "",
-            "KEYS"      => "",
-            "SHUTDOWN"  => "",
-            "SLAVEOF"   => "",
-            "CLIENT"    => "",
-            "RANDOMKEY" => "",
-            "DEBUG"     => "",
-            "MONITOR"   => ""
+            'CONFIG'    => '',
+            'FLUSHALL'  => '',
+            'FLUSHDB'   => '',
+            'KEYS'      => '',
+            'SHUTDOWN'  => '',
+            'SLAVEOF'   => '',
+            'CLIENT'    => '',
+            'RANDOMKEY' => '',
+            'DEBUG'     => '',
+            'MONITOR'   => ''
         },
         monitor         => true
     }
diff --git a/modules/toollabs/manifests/shadow.pp 
b/modules/toollabs/manifests/shadow.pp
index 02fd116..39e797e 100644
--- a/modules/toollabs/manifests/shadow.pp
+++ b/modules/toollabs/manifests/shadow.pp
@@ -11,14 +11,13 @@
 #
 # Sample Usage:
 #
-class toollabs::shadow($gridmaster) inherits toollabs {
+class toollabs::shadow($gridmaster = undef) inherits toollabs {
     include toollabs::infrastructure,
         toollabs::exec_environ,
         toollabs::gridnode
 
     class { 'gridengine::shadow_master':
         gridmaster => $gridmaster,
-        sgeroot => "$sysdir/gridengine",
+        sgeroot    => "${toollabs::sysdir}/gridengine",
     }
 }
-
diff --git a/modules/toollabs/manifests/submit.pp 
b/modules/toollabs/manifests/submit.pp
index 81a3ad7..f3bff06 100644
--- a/modules/toollabs/manifests/submit.pp
+++ b/modules/toollabs/manifests/submit.pp
@@ -11,7 +11,7 @@
 #
 # Sample Usage:
 #
-class toollabs::submit($gridmaster) inherits toollabs {
+class toollabs::submit($gridmaster = undef) inherits toollabs {
     include toollabs::exec_environ,
         toollabs::gridnode
 
@@ -28,7 +28,7 @@
     }
 
     class { 'toollabs::hba':
-        store => $store,
+        store => $toollabs::store,
     }
 
     file { '/etc/update-motd.d/40-bastion-banner':
@@ -36,15 +36,15 @@
         mode   => '0755',
         owner  => 'root',
         group  => 'root',
-        source => 
"puppet:///modules/toollabs/40-${instanceproject}-submithost-banner",
+        source => 
"puppet:///modules/toollabs/40-${::instanceproject}-submithost-banner",
     }
 
-    file { "${store}/submithost-${::fqdn}":
+    file { "${toollabs::store}/submithost-${::fqdn}":
         ensure  => file,
         owner   => 'root',
         group   => 'root',
         mode    => '0444',
-        require => File[$store],
+        require => File[$toollabs::store],
         content => "${::ipaddress}\n",
     }
 
@@ -52,4 +52,3 @@
         ensure => latest,
     }
 }
-
diff --git a/modules/toollabs/manifests/syslog.pp 
b/modules/toollabs/manifests/syslog.pp
index 1d8b3ee..9e8dc71 100644
--- a/modules/toollabs/manifests/syslog.pp
+++ b/modules/toollabs/manifests/syslog.pp
@@ -15,4 +15,3 @@
 
     #TODO:  config
 }
-
diff --git a/modules/toollabs/manifests/webnode.pp 
b/modules/toollabs/manifests/webnode.pp
index a09b17b..beb5e7c 100644
--- a/modules/toollabs/manifests/webnode.pp
+++ b/modules/toollabs/manifests/webnode.pp
@@ -11,7 +11,7 @@
 #
 # Sample Usage:
 #
-class toollabs::webnode($gridmaster) inherits toollabs {
+class toollabs::webnode($gridmaster = undef) inherits toollabs {
     include toollabs::exec_environ,
         toollabs::infrastructure,
         toollabs::gridnode
@@ -22,12 +22,12 @@
         gridmaster => $gridmaster,
     }
 
-    file { "${store}/execnode-${::fqdn}":
+    file { "${toollabs::store}/execnode-${::fqdn}":
         ensure  => file,
         owner   => 'root',
         group   => 'root',
         mode    => '0444',
-        require => File[$store],
+        require => File[$toollabs::store],
         content => "${::ipaddress}\n",
     }
 
@@ -47,7 +47,8 @@
 
     exec { 'make-shosts':
         command => '/usr/local/sbin/project-make-shosts 
>/etc/ssh/shosts.equiv~',
-        require => File['/usr/local/sbin/project-make-shosts', $store],
+        require => File['/usr/local/sbin/project-make-shosts',
+                        $toollabs::store],
     }
 
     file { '/etc/ssh/shosts.equiv':
@@ -69,7 +70,8 @@
 
     exec { 'make-access':
         command => '/usr/local/sbin/project-make-access 
>/etc/security/access.conf~',
-        require => File['/usr/local/sbin/project-make-access', $store],
+        require => File['/usr/local/sbin/project-make-access',
+                        $toollabs::store],
     }
 
     File <| title == '/etc/security/access.conf' |> {
@@ -82,7 +84,7 @@
         ensure => latest,
     }
 
-    package { 'lighttpd': 
+    package { 'lighttpd':
         ensure => latest,
         require => File['/var/run/lighttpd'],
     }
@@ -134,4 +136,3 @@
         source => 'puppet:///modules/toollabs/portgranter.conf',
     }
 }
-
diff --git a/modules/toollabs/manifests/webproxy.pp 
b/modules/toollabs/manifests/webproxy.pp
index 85b0f77..ae7de6d 100644
--- a/modules/toollabs/manifests/webproxy.pp
+++ b/modules/toollabs/manifests/webproxy.pp
@@ -15,4 +15,3 @@
 
     #TODO: apache config
 }
-

-- 
To view, visit https://gerrit.wikimedia.org/r/124001
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iac4fa7cedcb17a01fe99099c0305dc24c2c5017e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Tim Landscheidt <t...@tim-landscheidt.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to