system-config/modules/launchpad_sync/manifests/init.pp
Paul Belanger bd74f69d00 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
2012-09-28 21:24:49 +00:00

38 lines
988 B
Puppet

class launchpad_sync(
$root_team,
$script_logging_conf,
$site,
$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
]
package { $packages:
ensure => present,
}
file { '/usr/local/bin/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':
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