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