From 999d4e70c22a9752f45564efc6793fa1682ea2ba Mon Sep 17 00:00:00 2001 From: Matthew Wagoner Date: Mon, 29 Oct 2012 13:36:35 -0400 Subject: [PATCH] Cleanup zuul manifest init.pp lint errors. Change-Id: Ic2b8f638d4c328eeb92a86c6ce1b92a55b13d6bb Reviewed-on: https://review.openstack.org/14981 Reviewed-by: Clark Boylan Reviewed-by: Paul Belanger Reviewed-by: James E. Blair Approved: James E. Blair Tested-by: Jenkins --- modules/zuul/manifests/init.pp | 128 +++++++++++++++++---------------- 1 file changed, 66 insertions(+), 62 deletions(-) diff --git a/modules/zuul/manifests/init.pp b/modules/zuul/manifests/init.pp index 5f96692698..8e850b6bd0 100644 --- a/modules/zuul/manifests/init.pp +++ b/modules/zuul/manifests/init.pp @@ -1,113 +1,117 @@ +# == Class: zuul class zuul ( - $jenkins_server, - $jenkins_user, - $jenkins_apikey, - $gerrit_server, - $gerrit_user, - $url_pattern, - $status_url="https://${::fqdn}/zuul/status", - $git_source_repo='https://github.com/openstack-ci/zuul.git' + $jenkins_server, + $jenkins_user, + $jenkins_apikey, + $gerrit_server, + $gerrit_user, + $url_pattern, + $status_url = "https://${::fqdn}/zuul/status", + $git_source_repo = 'https://github.com/openstack-ci/zuul.git' ) { - $packages = ["python-webob", - "python-daemon", - "python-lockfile", - "python-paramiko", - "python-paste", - ] + $packages = [ + 'python-webob', + 'python-daemon', + 'python-lockfile', + 'python-paramiko', + 'python-paste', + ] package { $packages: - ensure => "present", + ensure => present, } # A lot of things need yaml, be conservative requiring this package to avoid # conflicts with other modules. if ! defined(Package['python-yaml']) { package { 'python-yaml': - ensure => "present", + ensure => present, } } # Packages that need to be installed from pip - $pip_packages = ["GitPython"] + $pip_packages = ['GitPython'] package { $pip_packages: - ensure => latest, # we want the latest from these + ensure => latest, # we want the latest from these provider => pip, - require => Class[pip] + require => Class['pip'], } - vcsrepo { "/opt/zuul": - ensure => latest, + vcsrepo { '/opt/zuul': + ensure => latest, provider => git, - revision => "master", - source => $git_source_repo, + revision => 'master', + source => $git_source_repo, } - exec { "install_zuul": - command => "python setup.py install", - cwd => "/opt/zuul", - path => "/bin:/usr/bin", + exec { 'install_zuul' : + command => 'python setup.py install', + cwd => '/opt/zuul', + path => '/bin:/usr/bin', refreshonly => true, - subscribe => Vcsrepo["/opt/zuul"], + subscribe => Vcsrepo['/opt/zuul'], } - file { "/etc/zuul": - ensure => "directory", + file { '/etc/zuul': + ensure => directory, } # TODO: We should put in notify either Service['zuul'] or Exec['zuul-reload'] # at some point, but that still has some problems. - file { "/etc/zuul/zuul.conf": - owner => 'jenkins', - mode => 400, - ensure => 'present', + file { '/etc/zuul/zuul.conf': + ensure => present, + owner => 'jenkins', + mode => '0400', content => template('zuul/zuul.conf.erb'), - require => [File["/etc/zuul"], Package['jenkins']] + require => [ + File['/etc/zuul'], + Package['jenkins'], + ], } - file { "/var/log/zuul": - ensure => "directory", - owner => 'jenkins', - require => Package['jenkins'] + file { '/var/log/zuul': + ensure => directory, + owner => 'jenkins', + require => Package['jenkins'], } - file { "/var/run/zuul": - ensure => "directory", - owner => 'jenkins', - require => Package['jenkins'] + file { '/var/run/zuul': + ensure => directory, + owner => 'jenkins', + require => Package['jenkins'], } - file { "/var/lib/zuul": - ensure => "directory", - owner => 'jenkins', - require => Package['jenkins'] + file { '/var/lib/zuul': + ensure => directory, + owner => 'jenkins', + require => Package['jenkins'], } - file { "/var/lib/zuul/git": - ensure => "directory", - owner => 'jenkins', - require => Package['jenkins'] + file { '/var/lib/zuul/git': + ensure => directory, + owner => 'jenkins', + require => Package['jenkins'], } - file { "/etc/init.d/zuul/": - owner => 'root', - group => 'root', - mode => 555, - ensure => 'present', + file { '/etc/init.d/zuul/': + ensure => present, + owner => 'root', + group => 'root', + mode => '0555', source => 'puppet:///modules/zuul/zuul.init', } - exec { "zuul-reload": - command => '/etc/init.d/zuul reload', - require => File['/etc/init.d/zuul'], - refreshonly => true, + exec { 'zuul-reload': + command => '/etc/init.d/zuul reload', + require => File['/etc/init.d/zuul'], + refreshonly => true, } service { 'zuul': name => 'zuul', enable => true, hasrestart => true, - require => File['/etc/init.d/zuul'], + require => File['/etc/init.d/zuul'], } - }