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':
ensure => present;
}
package { 'exim4-config':
ensure => present;
}
package { 'exim4-daemon-light':
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':
ensure => running,
hasrestart => true,
subscribe => File['/etc/exim4/exim4.conf'],
ensure => running,
hasrestart => true,
subscribe => File['/etc/exim4/exim4.conf'],
}
file { '/etc/exim4/exim4.conf':
owner => 'root',
group => 'root',
mode => 444,
ensure => 'present',
content => template("exim/exim4.conf.erb"),
replace => 'true',
ensure => present,
content => template('exim/exim4.conf.erb'),
group => 'root',
mode => '0444',
owner => 'root',
replace => true,
}
file { '/etc/aliases':
owner => 'root',
group => 'root',
mode => 444,
ensure => 'present',
content => template("exim/aliases.erb"),
replace => 'true',
ensure => present,
content => template('exim/aliases.erb'),
group => 'root',
mode => '0444',
owner => 'root',
replace => true,
}
}
# vim:sw=2:ts=2:expandtab:textwidth=79

View File

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

View File

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