Style Guide updates for puppet-lint

More fixes in preparation for our gate-ci-puppet-lint job.

Change-Id: I1cd3499e6cd958fbbacd01f3daef581a7b4d3217
Signed-off-by: Paul Belanger <paul.belanger@polybeacon.com>
Reviewed-on: https://review.openstack.org/13764
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Approved: James E. Blair <corvus@inaugust.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
This commit is contained in:
Paul Belanger 2012-09-27 11:19:13 -04:00 committed by Jenkins
parent 87a6a8801d
commit bd74f69d00
3 changed files with 76 additions and 64 deletions

View File

@ -1,36 +1,46 @@
class exim($sysadmin=[], $mailman_domains=[]) { class exim(
$mailman_domains = [],
$sysadmin = []
) {
package { 'exim4-base': package { 'exim4-base':
ensure => present;
}
package { 'exim4-config':
ensure => present;
}
package { 'exim4-daemon-light':
ensure => present, ensure => present,
require => [Package[exim4-base], Package[exim4-config]], }
package { 'exim4-config':
ensure => present,
}
package { 'exim4-daemon-light':
ensure => present,
require => [
Package[exim4-base],
Package[exim4-config]
],
} }
service { 'exim4': service { 'exim4':
ensure => running, ensure => running,
hasrestart => true, hasrestart => true,
subscribe => File['/etc/exim4/exim4.conf'], subscribe => File['/etc/exim4/exim4.conf'],
} }
file { '/etc/exim4/exim4.conf': file { '/etc/exim4/exim4.conf':
owner => 'root', ensure => present,
group => 'root', content => template('exim/exim4.conf.erb'),
mode => 444, group => 'root',
ensure => 'present', mode => '0444',
content => template("exim/exim4.conf.erb"), owner => 'root',
replace => 'true', replace => true,
} }
file { '/etc/aliases': file { '/etc/aliases':
owner => 'root', ensure => present,
group => 'root', content => template('exim/aliases.erb'),
mode => 444, group => 'root',
ensure => 'present', mode => '0444',
content => template("exim/aliases.erb"), owner => 'root',
replace => 'true', replace => true,
} }
} }
# vim:sw=2:ts=2:expandtab:textwidth=79

View File

@ -15,23 +15,24 @@ class gerritbot(
} }
file { '/etc/init.d/gerritbot': file { '/etc/init.d/gerritbot':
owner => 'root', ensure => present,
group => 'root', group => 'root',
mode => 555, mode => '0555',
ensure => 'present', owner => 'root',
source => 'puppet:///modules/gerritbot/gerritbot.init',
require => Package['gerritbot'], require => Package['gerritbot'],
source => 'puppet:///modules/gerritbot/gerritbot.init',
} }
service { 'gerritbot': service { 'gerritbot':
name => 'gerritbot',
ensure => running, ensure => running,
enable => true, enable => true,
hasrestart => true, hasrestart => true,
require => File['/etc/init.d/gerritbot'], require => File['/etc/init.d/gerritbot'],
subscribe => [Package['gerritbot'], subscribe => [
File['/etc/gerritbot/gerritbot.config'], Package['gerritbot'],
File['/etc/gerritbot/channel_config.yaml']], File['/etc/gerritbot/gerritbot.config'],
File['/etc/gerritbot/channel_config.yaml']
],
} }
file { '/etc/gerritbot': file { '/etc/gerritbot':
@ -40,39 +41,40 @@ class gerritbot(
file { '/var/log/gerritbot': file { '/var/log/gerritbot':
ensure => directory, ensure => directory,
owner => 'root',
group => 'gerrit2', group => 'gerrit2',
mode => 0775, mode => '0775',
owner => 'root',
} }
file { '/etc/gerritbot/channel_config.yaml': file { '/etc/gerritbot/channel_config.yaml':
owner => 'root', ensure => present,
group => 'gerrit2', group => 'gerrit2',
mode => 440, mode => '0440',
ensure => 'present', owner => 'root',
source => 'puppet:///modules/gerritbot/gerritbot_channel_config.yaml',
replace => true, replace => true,
require => User['gerrit2'], require => User['gerrit2'],
source => 'puppet:///modules/gerritbot/gerritbot_channel_config.yaml',
} }
file { '/etc/gerritbot/logging.config': file { '/etc/gerritbot/logging.config':
owner => 'root', ensure => present,
group => 'gerrit2', group => 'gerrit2',
mode => 440, mode => '0440',
ensure => 'present', owner => 'root',
source => 'puppet:///modules/gerritbot/logging.config',
replace => true, replace => true,
require => User['gerrit2'], require => User['gerrit2'],
source => 'puppet:///modules/gerritbot/logging.config',
} }
file { '/etc/gerritbot/gerritbot.config': file { '/etc/gerritbot/gerritbot.config':
owner => 'root', ensure => present,
group => 'gerrit2',
mode => 440,
ensure => 'present',
content => template('gerritbot/gerritbot.config.erb'), content => template('gerritbot/gerritbot.config.erb'),
replace => 'true', group => 'gerrit2',
mode => '0440',
owner => 'root',
replace => true,
require => User['gerrit2'] require => User['gerrit2']
} }
} }
# vim:sw=2:ts=2:expandtab:textwidth=79

View File

@ -1,37 +1,37 @@
class launchpad_sync( class launchpad_sync(
$user='gerrit2', $root_team,
$script_user='update',
$script_key_file='/home/gerrit2/.ssh/id_rsa',
$script_logging_conf, $script_logging_conf,
$site, $site,
$root_team $script_key_file = '/home/gerrit2/.ssh/id_rsa',
$script_user = 'update',
$user = 'gerrit2'
) { ) {
include mysql include mysql
include mysql::python include mysql::python
$packages = [ $packages = [
"python-openid", # for launchpad sync script 'python-openid', # for launchpad sync script
"python-launchpadlib", # for launchpad sync script 'python-launchpadlib', # for launchpad sync script
] ]
package { $packages: package { $packages:
ensure => present, ensure => present,
} }
file { '/usr/local/bin/update_gerrit_users.py': file { '/usr/local/bin/update_gerrit_users.py':
owner => 'root', ensure => present,
group => 'root', group => 'root',
mode => 755, mode => '0755',
source => "puppet:///modules/launchpad_sync/update_gerrit_users.py", owner => 'root',
ensure => present, source => 'puppet:///modules/launchpad_sync/update_gerrit_users.py',
} }
cron { "sync_launchpad_users": cron { 'sync_launchpad_users':
user => $user, user => $user,
minute => "*/15", minute => '*/15',
command => "sleep $((RANDOM\\%60+60)) && timeout -k 5m 8h python /usr/local/bin/update_gerrit_users.py ${script_user} ${script_key_file} ${site} ${root_team} ${script_logging_conf}", command => "sleep $((RANDOM\\%60+60)) && timeout -k 5m 8h python /usr/local/bin/update_gerrit_users.py ${script_user} ${script_key_file} ${site} ${root_team} ${script_logging_conf}",
require => File['/usr/local/bin/update_gerrit_users.py'], require => File['/usr/local/bin/update_gerrit_users.py'],
} }
} }
# vim:sw=2:ts=2:expandtab:textwidth=79