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:
parent
87a6a8801d
commit
bd74f69d00
@ -1,13 +1,21 @@
|
||||
class exim($sysadmin=[], $mailman_domains=[]) {
|
||||
class exim(
|
||||
$mailman_domains = [],
|
||||
$sysadmin = []
|
||||
) {
|
||||
package { 'exim4-base':
|
||||
ensure => present;
|
||||
ensure => present,
|
||||
}
|
||||
|
||||
package { 'exim4-config':
|
||||
ensure => present;
|
||||
ensure => present,
|
||||
}
|
||||
|
||||
package { 'exim4-daemon-light':
|
||||
ensure => present,
|
||||
require => [Package[exim4-base], Package[exim4-config]],
|
||||
require => [
|
||||
Package[exim4-base],
|
||||
Package[exim4-config]
|
||||
],
|
||||
}
|
||||
|
||||
service { 'exim4':
|
||||
@ -17,20 +25,22 @@ class exim($sysadmin=[], $mailman_domains=[]) {
|
||||
}
|
||||
|
||||
file { '/etc/exim4/exim4.conf':
|
||||
owner => 'root',
|
||||
ensure => present,
|
||||
content => template('exim/exim4.conf.erb'),
|
||||
group => 'root',
|
||||
mode => 444,
|
||||
ensure => 'present',
|
||||
content => template("exim/exim4.conf.erb"),
|
||||
replace => 'true',
|
||||
mode => '0444',
|
||||
owner => 'root',
|
||||
replace => true,
|
||||
}
|
||||
|
||||
file { '/etc/aliases':
|
||||
owner => 'root',
|
||||
ensure => present,
|
||||
content => template('exim/aliases.erb'),
|
||||
group => 'root',
|
||||
mode => 444,
|
||||
ensure => 'present',
|
||||
content => template("exim/aliases.erb"),
|
||||
replace => 'true',
|
||||
mode => '0444',
|
||||
owner => 'root',
|
||||
replace => true,
|
||||
}
|
||||
}
|
||||
|
||||
# vim:sw=2:ts=2:expandtab:textwidth=79
|
||||
|
@ -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'],
|
||||
subscribe => [
|
||||
Package['gerritbot'],
|
||||
File['/etc/gerritbot/gerritbot.config'],
|
||||
File['/etc/gerritbot/channel_config.yaml']],
|
||||
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
|
||||
|
@ -1,18 +1,17 @@
|
||||
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:
|
||||
@ -20,18 +19,19 @@ class launchpad_sync(
|
||||
}
|
||||
|
||||
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,
|
||||
group => 'root',
|
||||
mode => '0755',
|
||||
owner => 'root',
|
||||
source => 'puppet:///modules/launchpad_sync/update_gerrit_users.py',
|
||||
}
|
||||
|
||||
cron { "sync_launchpad_users":
|
||||
cron { 'sync_launchpad_users':
|
||||
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}",
|
||||
require => File['/usr/local/bin/update_gerrit_users.py'],
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
# vim:sw=2:ts=2:expandtab:textwidth=79
|
||||
|
Loading…
Reference in New Issue
Block a user