Set some parameters to more sensible defaults.
Also, moved depends for launchpad sync script to the launchpad sync module, and put the ntp stuff into an ntp module. Change-Id: I2568752493fefa305f9108a23da101d80a311552
This commit is contained in:
parent
0b921968d1
commit
ef3881d487
@ -1,6 +1,6 @@
|
||||
class gerrit::cron(
|
||||
$script_user,
|
||||
$script_key_file
|
||||
$script_user='update',
|
||||
$script_key_file='/home/gerrit2/.ssh/id_rsa'
|
||||
) {
|
||||
|
||||
cron { "expireoldreviews":
|
||||
|
@ -53,8 +53,8 @@
|
||||
|
||||
class gerrit($virtual_hostname=$fqdn,
|
||||
$canonicalweburl="https://$fqdn/",
|
||||
$ssl_cert_file='',
|
||||
$ssl_key_file='',
|
||||
$ssl_cert_file='/etc/ssl/certs/ssl-cert-snakeoil.pem',
|
||||
$ssl_key_file='/etc/ssl/private/ssl-cert-snakeoil.key',
|
||||
$ssl_chain_file='',
|
||||
$openidssourl="https://login.launchpad.net/+openid",
|
||||
$email='',
|
||||
@ -70,8 +70,6 @@ class gerrit($virtual_hostname=$fqdn,
|
||||
$httpd_maxwait='',
|
||||
$commentlinks = [],
|
||||
$war,
|
||||
$script_user,
|
||||
$script_key_file,
|
||||
$enable_melody = 'false',
|
||||
$melody_session = 'false',
|
||||
$mysql_password,
|
||||
|
@ -1,11 +1,23 @@
|
||||
class launchpad_sync(
|
||||
$user,
|
||||
$script_user,
|
||||
$script_key_file,
|
||||
$user='gerrit2',
|
||||
$script_user='update',
|
||||
$script_key_file='/home/gerrit2/.ssh/id_rsa',
|
||||
$site,
|
||||
$root_team
|
||||
) {
|
||||
|
||||
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':
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
|
15
modules/ntp/manifests/init.pp
Normal file
15
modules/ntp/manifests/init.pp
Normal file
@ -0,0 +1,15 @@
|
||||
class ntp {
|
||||
|
||||
package { "ntp":
|
||||
ensure => installed
|
||||
}
|
||||
|
||||
service { 'ntpd':
|
||||
name => 'ntp',
|
||||
ensure => running,
|
||||
enable => true,
|
||||
hasrestart => true,
|
||||
require => Package['ntp'],
|
||||
}
|
||||
|
||||
}
|
@ -21,8 +21,8 @@ class openstack_project::gerrit (
|
||||
$httpd_maxthreads='',
|
||||
$httpd_maxwait='',
|
||||
$war,
|
||||
$script_user,
|
||||
$script_key_file,
|
||||
$script_user='update',
|
||||
$script_key_file='/home/gerrit2/.ssh/id_rsa',
|
||||
$github_projects = [],
|
||||
$github_username,
|
||||
$github_oauth_token,
|
||||
@ -31,19 +31,6 @@ class openstack_project::gerrit (
|
||||
$email_private_key,
|
||||
$testmode=false,
|
||||
) {
|
||||
class { 'openstack_project::server':
|
||||
iptables_public_tcp_ports => [80, 443, 29418]
|
||||
}
|
||||
|
||||
$packages = [
|
||||
"python-mysqldb", # for launchpad sync script
|
||||
"python-openid", # for launchpad sync script
|
||||
"python-launchpadlib", # for launchpad sync script
|
||||
]
|
||||
|
||||
package { $packages:
|
||||
ensure => present,
|
||||
}
|
||||
|
||||
class { '::gerrit':
|
||||
virtual_hostname => $virtual_hostname,
|
||||
@ -80,13 +67,12 @@ class openstack_project::gerrit (
|
||||
link => 'https://blueprints.launchpad.net/openstack/?searchtext=$2' },
|
||||
],
|
||||
war => $war,
|
||||
script_user => $script_user,
|
||||
script_key_file => $script_key_file,
|
||||
mysql_password => $mysql_password,
|
||||
mysql_root_password => $mysql_root_password,
|
||||
email_private_key => $email_private_key,
|
||||
replicate_github => true,
|
||||
testmode => $testmode,
|
||||
require => Class[openstack_project::server],
|
||||
}
|
||||
if ($testmode == false) {
|
||||
class { 'gerrit::cron':
|
||||
|
@ -11,8 +11,6 @@ class openstack_project::review_dev(
|
||||
ssl_chain_file => '',
|
||||
email => "review-dev@openstack.org",
|
||||
war => 'http://tarballs.openstack.org/ci/gerrit-2.4.2-11-gb5a28fb.war',
|
||||
script_user => 'update',
|
||||
script_key_file => '/home/gerrit2/.ssh/id_rsa',
|
||||
github_projects => [ {
|
||||
name => 'gtest-org/test',
|
||||
close_pull => 'true'
|
||||
|
@ -1,6 +1,7 @@
|
||||
# A template host with no running services
|
||||
class openstack_project::template ($iptables_public_tcp_ports) {
|
||||
include openstack_project::base
|
||||
include ntp
|
||||
include ssh
|
||||
include snmpd
|
||||
include apt::unattended-upgrades
|
||||
@ -8,16 +9,4 @@ class openstack_project::template ($iptables_public_tcp_ports) {
|
||||
class { 'iptables':
|
||||
public_tcp_ports => $iptables_public_tcp_ports,
|
||||
}
|
||||
|
||||
package { "ntp":
|
||||
ensure => installed
|
||||
}
|
||||
|
||||
service { 'ntpd':
|
||||
name => 'ntp',
|
||||
ensure => running,
|
||||
enable => true,
|
||||
hasrestart => true,
|
||||
require => Package['ntp'],
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user