Additional puppet-lint reformatting
Change-Id: I49e63755b8b5bf60673cf37b62371b3f299e3bbe Signed-off-by: Paul Belanger <paul.belanger@polybeacon.com> Reviewed-on: https://review.openstack.org/14971 Reviewed-by: James E. Blair <corvus@inaugust.com> Approved: Clark Boylan <clark.boylan@gmail.com> Reviewed-by: Clark Boylan <clark.boylan@gmail.com> Tested-by: Jenkins
This commit is contained in:
parent
df9583aaf4
commit
57d13bacfd
@ -1,41 +1,39 @@
|
||||
# A machine ready to run devstack
|
||||
class devstack_host {
|
||||
package { 'linux-headers-virtual':
|
||||
ensure => present,
|
||||
}
|
||||
|
||||
package { "linux-headers-virtual":
|
||||
ensure => present,
|
||||
}
|
||||
package { 'mysql-server':
|
||||
ensure => present,
|
||||
}
|
||||
|
||||
package { "mysql-server":
|
||||
ensure => present,
|
||||
}
|
||||
package { 'rabbitmq-server':
|
||||
ensure => present,
|
||||
require => File['/etc/rabbitmq/rabbitmq-env.conf'],
|
||||
}
|
||||
|
||||
package { "rabbitmq-server":
|
||||
ensure => present,
|
||||
require => File['rabbitmq-env.conf'],
|
||||
}
|
||||
file { '/etc/rabbitmq':
|
||||
ensure => directory,
|
||||
}
|
||||
|
||||
file { "/etc/rabbitmq":
|
||||
ensure => "directory",
|
||||
}
|
||||
|
||||
file { 'rabbitmq-env.conf':
|
||||
name => '/etc/rabbitmq/rabbitmq-env.conf',
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => 444,
|
||||
ensure => 'present',
|
||||
source => [
|
||||
"puppet:///modules/devstack_host/rabbitmq-env.conf",
|
||||
],
|
||||
require => File['/etc/rabbitmq'],
|
||||
}
|
||||
|
||||
exec { "Set MySQL server root password":
|
||||
subscribe => [ Package["mysql-server"]],
|
||||
refreshonly => true,
|
||||
unless => "mysqladmin -uroot -psecret status",
|
||||
path => "/bin:/usr/bin",
|
||||
command => "mysqladmin -uroot password secret",
|
||||
}
|
||||
file { '/etc/rabbitmq/rabbitmq-env.conf':
|
||||
ensure => present,
|
||||
group => 'root',
|
||||
mode => '0444',
|
||||
owner => 'root',
|
||||
require => File['/etc/rabbitmq'],
|
||||
source => 'puppet:///modules/devstack_host/rabbitmq-env.conf',
|
||||
}
|
||||
|
||||
# TODO: We should be using existing mysql functions do this.
|
||||
exec { 'Set MySQL server root password':
|
||||
command => 'mysqladmin -uroot password secret',
|
||||
path => '/bin:/usr/bin',
|
||||
refreshonly => true,
|
||||
subscribe => Package['mysql-server'],
|
||||
unless => 'mysqladmin -uroot -psecret status',
|
||||
}
|
||||
}
|
||||
|
||||
# vim:sw=2:ts=2:expandtab:textwidth=79
|
||||
|
@ -5,13 +5,12 @@ class gerritbot(
|
||||
$user,
|
||||
$vhost_name
|
||||
) {
|
||||
|
||||
include pip
|
||||
|
||||
package { 'gerritbot':
|
||||
ensure => present, # Pip upgrade is not working
|
||||
provider => pip,
|
||||
require => Class[pip]
|
||||
require => Class['pip']
|
||||
}
|
||||
|
||||
file { '/etc/init.d/gerritbot':
|
||||
@ -36,7 +35,7 @@ class gerritbot(
|
||||
}
|
||||
|
||||
file { '/etc/gerritbot':
|
||||
ensure => directory
|
||||
ensure => directory,
|
||||
}
|
||||
|
||||
file { '/var/log/gerritbot':
|
||||
@ -73,7 +72,7 @@ class gerritbot(
|
||||
mode => '0440',
|
||||
owner => 'root',
|
||||
replace => true,
|
||||
require => User['gerrit2']
|
||||
require => User['gerrit2'],
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,15 +1,14 @@
|
||||
class github (
|
||||
$username,
|
||||
$oauth_token,
|
||||
$projects = []
|
||||
) {
|
||||
|
||||
class github(
|
||||
$username,
|
||||
$oauth_token,
|
||||
$projects = []
|
||||
) {
|
||||
include pip
|
||||
|
||||
package { "PyGithub":
|
||||
ensure => latest, # okay to use latest for pip
|
||||
package { 'PyGithub':
|
||||
ensure => latest, # okay to use latest for pip
|
||||
provider => pip,
|
||||
require => Class[pip]
|
||||
require => Class['pip'],
|
||||
}
|
||||
|
||||
# A lot of things need yaml, be conservative requiring this package to avoid
|
||||
@ -20,66 +19,69 @@ class github (
|
||||
}
|
||||
}
|
||||
|
||||
group { "github":
|
||||
ensure => present
|
||||
group { 'github':
|
||||
ensure => present,
|
||||
}
|
||||
|
||||
user { "github":
|
||||
ensure => present,
|
||||
comment => "Github API User",
|
||||
shell => "/bin/bash",
|
||||
gid => "github",
|
||||
require => Group["github"]
|
||||
user { 'github':
|
||||
ensure => present,
|
||||
comment => 'Github API User',
|
||||
shell => '/bin/bash',
|
||||
gid => 'github',
|
||||
require => Group['github'],
|
||||
}
|
||||
|
||||
file { '/etc/github':
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => 755,
|
||||
ensure => 'directory',
|
||||
ensure => directory,
|
||||
group => 'root',
|
||||
mode => '0755',
|
||||
owner => 'root',
|
||||
}
|
||||
|
||||
file { '/etc/github/github.config':
|
||||
ensure => absent
|
||||
ensure => absent,
|
||||
}
|
||||
|
||||
file { '/etc/github/github.secure.config':
|
||||
owner => 'root',
|
||||
group => 'github',
|
||||
mode => 440,
|
||||
ensure => 'present',
|
||||
ensure => present,
|
||||
content => template('github/github.secure.config.erb'),
|
||||
replace => 'true',
|
||||
require => [Group['github'], File['/etc/github']],
|
||||
group => 'github',
|
||||
mode => '0440',
|
||||
owner => 'root',
|
||||
replace => true,
|
||||
require => [
|
||||
Group['github'],
|
||||
File['/etc/github']
|
||||
],
|
||||
}
|
||||
|
||||
file { '/usr/local/github':
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => 755,
|
||||
ensure => 'directory',
|
||||
ensure => directory,
|
||||
group => 'root',
|
||||
mode => '0755',
|
||||
owner => 'root',
|
||||
}
|
||||
|
||||
file { '/usr/local/github/scripts':
|
||||
owner => 'root',
|
||||
group => 'root',
|
||||
mode => 755,
|
||||
ensure => 'directory',
|
||||
ensure => directory,
|
||||
group => 'root',
|
||||
mode => '0755',
|
||||
owner => 'root',
|
||||
recurse => true,
|
||||
require => File['/usr/local/github'],
|
||||
source => [
|
||||
"puppet:///modules/github/scripts",
|
||||
],
|
||||
source => 'puppet:///modules/github/scripts',
|
||||
}
|
||||
|
||||
cron { "githubclosepull":
|
||||
user => github,
|
||||
minute => "*/5",
|
||||
cron { 'githubclosepull':
|
||||
command => 'sleep $((RANDOM\%60+90)) && python /usr/local/github/scripts/close_pull_requests.py',
|
||||
minute => '*/5',
|
||||
require => [
|
||||
File['/usr/local/github/scripts'],
|
||||
Package['python-yaml'],
|
||||
Package['PyGithub'],
|
||||
],
|
||||
File['/usr/local/github/scripts'],
|
||||
Package['python-yaml'],
|
||||
Package['PyGithub'],
|
||||
],
|
||||
user => github,
|
||||
}
|
||||
}
|
||||
|
||||
# vim:sw=2:ts=2:expandtab:textwidth=79
|
||||
|
Loading…
Reference in New Issue
Block a user