Andrew Bogott has submitted this change and it was merged.

Change subject: zuul: lint
......................................................................


zuul: lint

Change-Id: I1d90efb518ecb250304cb77bba9ad706a5d7c1a0
---
M modules/zuul/manifests/init.pp
M modules/zuul/manifests/merger.pp
M modules/zuul/manifests/server.pp
3 files changed, 72 insertions(+), 81 deletions(-)

Approvals:
  Andrew Bogott: Looks good to me, approved
  Hashar: Checked; Looks good to me, but someone else must approve
  jenkins-bot: Verified
  Dzahn: Looks good to me, but someone else must approve



diff --git a/modules/zuul/manifests/init.pp b/modules/zuul/manifests/init.pp
index ef13ecc..3e3de0d 100644
--- a/modules/zuul/manifests/init.pp
+++ b/modules/zuul/manifests/init.pp
@@ -17,82 +17,80 @@
 #
 class zuul (
     $git_source_repo = 'https://gerrit.wikimedia.org/r/p/integration/zuul.git',
-) {
+){
 
-  include zuul::user
+    include zuul::user
 
-  # Dependencies as mentionned in zuul:tools/pip-requires
-  $packages = [
-    'python-yaml',
-    'python-webob',
-    'python-daemon',
-    'python-lockfile',
-    'python-paramiko',
-    'python-jenkins',
-    'python-paste',
+    # Dependencies as mentionned in zuul:tools/pip-requires
+    $packages = [
+        'python-yaml',
+        'python-webob',
+        'python-daemon',
+        'python-lockfile',
+        'python-paramiko',
+        'python-jenkins',
+        'python-paste',
 
-    # GitPython at least 0.3.2RC1 which is neither in Lucid nor in Precise
-    # We had to backport it and its dependencies from Quantal:
-    'python-git',
-    'python-gitdb',
-    'python-async',
-    'python-smmap',
+        # GitPython at least 0.3.2RC1 which is neither in Lucid nor in Precise
+        # We had to backport it and its dependencies from Quantal:
+        'python-git',
+        'python-gitdb',
+        'python-async',
+        'python-smmap',
 
-    'python-extras',  # backported in Precise (bug 47122)
+        'python-extras',  # backported in Precise (bug 47122)
 
-    'python-pip',
-    'python-setuptools',
-    'python-voluptuous',
+        'python-pip',
+        'python-setuptools',
+        'python-voluptuous',
 
-    # For Zuul post v1.3.0
-    'python-pbr',
-    'python-gear',
-    'python-apscheduler',
+        # For Zuul post v1.3.0
+        'python-pbr',
+        'python-gear',
+        'python-apscheduler',
 
-    'python-babel',
-    'python-prettytable',
-  ]
+        'python-babel',
+        'python-prettytable',
+    ]
 
-  require_package('python-statsd')
-  ensure_packages($packages)
+    require_package('python-statsd')
+    ensure_packages($packages)
 
-  # Used to be in /var/lib/git/zuul but /var/lib/git can be used
-  # to replicate git bare repositories.
-  $zuul_source_dir = '/usr/local/src/zuul'
+    # Used to be in /var/lib/git/zuul but /var/lib/git can be used
+    # to replicate git bare repositories.
+    $zuul_source_dir = '/usr/local/src/zuul'
 
-  git::clone { 'integration/zuul':
-    ensure    => present,
-    directory => $zuul_source_dir,
-    origin    => $git_source_repo,
-    branch    => 'master',
-  }
+    git::clone { 'integration/zuul':
+        ensure    => present,
+        directory => $zuul_source_dir,
+        origin    => $git_source_repo,
+        branch    => 'master',
+    }
 
-  exec { 'install_zuul':
-    # Make sure to install without downloading from pypi
-    command     => 'python setup.py install',
-    environment => 'HTTP_PROXY=. HTTPS_PROXY=.',
-    cwd         => $zuul_source_dir,
-    path        => '/bin:/usr/bin',
-    umask       => 022,
-    refreshonly => true,
-    subscribe   => Git::Clone['integration/zuul'],
-    require     => [
-      Package[$packages],
-    ],
-  }
+    exec { 'install_zuul':
+        # Make sure to install without downloading from pypi
+        command     => 'python setup.py install',
+        environment => 'HTTP_PROXY=. HTTPS_PROXY=.',
+        cwd         => $zuul_source_dir,
+        path        => '/bin:/usr/bin',
+        umask       => '022',
+        refreshonly => true,
+        subscribe   => Git::Clone['integration/zuul'],
+        require     => Package[$packages],
+    }
 
-  file { '/etc/zuul':
-    ensure => directory,
-  }
+    file { '/etc/zuul':
+        ensure => directory,
+    }
 
-  file { '/var/log/zuul':
-    ensure  => directory,
-    owner   => 'zuul',
-  }
+    file { '/var/log/zuul':
+        ensure  => directory,
+        owner   => 'zuul',
+    }
 
-  file { '/var/lib/zuul':
-    ensure  => directory,
-    owner   => 'zuul',
-  }
+    file { '/var/lib/zuul':
+        ensure  => directory,
+        owner   => 'zuul',
+    }
 
 }
diff --git a/modules/zuul/manifests/merger.pp b/modules/zuul/manifests/merger.pp
index 14dd490..7d2b565 100644
--- a/modules/zuul/manifests/merger.pp
+++ b/modules/zuul/manifests/merger.pp
@@ -21,11 +21,11 @@
     $gerrit_user,
     $url_pattern,
     $gerrit_baseurl = 'https://gerrit.wikimedia.org/r',
-    $git_dir = '/var/lib/zuul/git',
-    $git_email = "zuul-merger@${::hostname}",
-    $git_name = 'Wikimedia Zuul Merger',
-    $status_url = "https://${::fqdn}/zuul/status";,
-    $zuul_url = 'git://zuul.eqiad.wmnet',
+    $git_dir        = '/var/lib/zuul/git',
+    $git_email      = "zuul-merger@${::hostname}",
+    $git_name       = 'Wikimedia Zuul Merger',
+    $status_url     = "https://${::fqdn}/zuul/status";,
+    $zuul_url       = 'git://zuul.eqiad.wmnet',
 ) {
 
     file { $git_dir:
@@ -39,10 +39,7 @@
         owner     => 'root',
         group     => 'root',
         mode      => '0444',
-
-        require   => [
-            File['/etc/zuul'],
-        ],
+        require   => File['/etc/zuul'],
     }
 
     file { '/etc/default/zuul-merger':
@@ -91,8 +88,6 @@
         minute      => '7',
         command     => "MAILTO='[email protected]' find ${git_dir} 
-maxdepth 3 -type d -name '.git' -exec git --git-dir='{}' pack-refs --all \\;",
         environment => 'PATH=/usr/bin:/bin:/usr/sbin:/sbin',
-        require     => [
-            File[$git_dir],
-        ],
+        require     => File[$git_dir],
     }
 }
diff --git a/modules/zuul/manifests/server.pp b/modules/zuul/manifests/server.pp
index d243f30..65b5d79 100644
--- a/modules/zuul/manifests/server.pp
+++ b/modules/zuul/manifests/server.pp
@@ -28,9 +28,9 @@
     $jenkins_user,
     $jenkins_apikey,
     $url_pattern,
-    $statsd_host = '',
+    $statsd_host    = '',
     $gerrit_baseurl = 'https://gerrit.wikimedia.org/r',
-    $status_url = "https://${::fqdn}/zuul/status";,
+    $status_url     = "https://${::fqdn}/zuul/status";,
 ) {
 
     file { '/var/run/zuul':
@@ -59,7 +59,7 @@
     # reload via the `zuul-reload` exect provided by the `zuul`
     # puppet module..
     file { '/etc/zuul/logging.conf':
-        ensure => 'present',
+        ensure => present,
         source => 'puppet:///modules/zuul/logging.conf',
         notify => Exec['zuul-reload'],
     }
@@ -78,9 +78,7 @@
         group     => 'root',
         mode      => '0400',
         notify    => Exec['craft public zuul conf'],
-        require   => [
-            File['/etc/zuul'],
-        ],
+        require   => File['/etc/zuul'],
     }
 
     file { '/usr/local/bin/zuul-gearman.py':

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1d90efb518ecb250304cb77bba9ad706a5d7c1a0
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Matanya <[email protected]>
Gerrit-Reviewer: Alexandros Kosiaris <[email protected]>
Gerrit-Reviewer: Andrew Bogott <[email protected]>
Gerrit-Reviewer: Dzahn <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to