Undo problematic line continuations and ignore.
* Rakefile: Override line length warnings from puppet-lint with its disable_80chars option. * modules/gerrit/manifests/cron.pp, modules/gerrit/manifests/init.pp, modules/gerrit/manifests/remotes.pp, modules/lodgeit/manifests/site.pp, modules/openstack_project/manifests/cacti.pp: Undo line continuations on long strings. These were causing particular problems when attempting to apply crontab entries. Change-Id: I417788d7953ee0d2b717349564ee9cc78c0c49c2 Reviewed-on: https://review.openstack.org/15822 Reviewed-by: Paul Belanger <paul.belanger@polybeacon.com> 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
16c0b4afc4
commit
d1f76c1b99
2
Rakefile
2
Rakefile
@ -1,2 +1,4 @@
|
|||||||
require 'rubygems'
|
require 'rubygems'
|
||||||
require 'puppetlabs_spec_helper/rake_tasks'
|
require 'puppetlabs_spec_helper/rake_tasks'
|
||||||
|
require 'puppet-lint/tasks/puppet-lint'
|
||||||
|
PuppetLint.configuration.send('disable_80chars')
|
||||||
|
@ -9,27 +9,24 @@ class gerrit::cron(
|
|||||||
user => 'gerrit2',
|
user => 'gerrit2',
|
||||||
hour => '6',
|
hour => '6',
|
||||||
minute => '3',
|
minute => '3',
|
||||||
command => "python /usr/local/gerrit/scripts/expire_old_reviews.py \
|
command => "python /usr/local/gerrit/scripts/expire_old_reviews.py ${script_user} ${script_key_file}",
|
||||||
${script_user} ${script_key_file}",
|
|
||||||
require => File['/usr/local/gerrit/scripts'],
|
require => File['/usr/local/gerrit/scripts'],
|
||||||
}
|
}
|
||||||
|
|
||||||
cron { 'gerrit_repack':
|
cron { 'gerrit_repack':
|
||||||
user => 'gerrit2',
|
user => 'gerrit2',
|
||||||
weekday => '0',
|
weekday => '0',
|
||||||
hour => '4',
|
hour => '4',
|
||||||
minute => '7',
|
minute => '7',
|
||||||
command => 'find /home/gerrit2/review_site/git/ -type d -name "*.git" \
|
command => 'find /home/gerrit2/review_site/git/ -type d -name "*.git" -print -exec git --git-dir="{}" repack -afd \;',
|
||||||
-print -exec git --git-dir="{}" repack -afd \;',
|
|
||||||
environment => 'PATH=/usr/bin:/bin:/usr/sbin:/sbin',
|
environment => 'PATH=/usr/bin:/bin:/usr/sbin:/sbin',
|
||||||
}
|
}
|
||||||
|
|
||||||
cron { 'removedbdumps':
|
cron { 'removedbdumps':
|
||||||
user => 'gerrit2',
|
user => 'gerrit2',
|
||||||
hour => '5',
|
hour => '5',
|
||||||
minute => '1',
|
minute => '1',
|
||||||
command => 'find /home/gerrit2/dbupdates/ -name "*.sql.gz" -mtime +30 \
|
command => 'find /home/gerrit2/dbupdates/ -name "*.sql.gz" -mtime +30 -exec rm -f {} \;',
|
||||||
-exec rm -f {} \;',
|
|
||||||
environment => 'PATH=/usr/bin:/bin:/usr/sbin:/sbin',
|
environment => 'PATH=/usr/bin:/bin:/usr/sbin:/sbin',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -223,8 +223,7 @@ class gerrit(
|
|||||||
|
|
||||||
exec { 'make_local_repos':
|
exec { 'make_local_repos':
|
||||||
user => 'gerrit2',
|
user => 'gerrit2',
|
||||||
command => "/usr/local/gerrit/scripts/make_local_repos.py \
|
command => "/usr/local/gerrit/scripts/make_local_repos.py ${local_git_dir}",
|
||||||
${local_git_dir}",
|
|
||||||
subscribe => File['/home/gerrit2/projects.yaml'],
|
subscribe => File['/home/gerrit2/projects.yaml'],
|
||||||
refreshonly => true,
|
refreshonly => true,
|
||||||
require => File['/home/gerrit2/projects.yaml'],
|
require => File['/home/gerrit2/projects.yaml'],
|
||||||
@ -418,8 +417,7 @@ class gerrit(
|
|||||||
# If gerrit.war was just installed, run the Gerrit "init" command.
|
# If gerrit.war was just installed, run the Gerrit "init" command.
|
||||||
exec { 'gerrit-initial-init':
|
exec { 'gerrit-initial-init':
|
||||||
user => 'gerrit2',
|
user => 'gerrit2',
|
||||||
command => '/usr/bin/java -jar /home/gerrit2/review_site/bin/gerrit.war \
|
command => '/usr/bin/java -jar /home/gerrit2/review_site/bin/gerrit.war init -d /home/gerrit2/review_site --batch --no-auto-start',
|
||||||
init -d /home/gerrit2/review_site --batch --no-auto-start',
|
|
||||||
subscribe => File['/home/gerrit2/review_site/bin/gerrit.war'],
|
subscribe => File['/home/gerrit2/review_site/bin/gerrit.war'],
|
||||||
require => [Package['openjdk-6-jre-headless'],
|
require => [Package['openjdk-6-jre-headless'],
|
||||||
User['gerrit2'],
|
User['gerrit2'],
|
||||||
@ -436,9 +434,7 @@ class gerrit(
|
|||||||
# Running the init script as the gerrit2 user _does_ work.
|
# Running the init script as the gerrit2 user _does_ work.
|
||||||
exec { 'gerrit-init':
|
exec { 'gerrit-init':
|
||||||
user => 'gerrit2',
|
user => 'gerrit2',
|
||||||
command => '/etc/init.d/gerrit stop; /usr/bin/java -jar \
|
command => '/etc/init.d/gerrit stop; /usr/bin/java -jar /home/gerrit2/review_site/bin/gerrit.war init -d /home/gerrit2/review_site --batch --no-auto-start',
|
||||||
/home/gerrit2/review_site/bin/gerrit.war init \
|
|
||||||
-d /home/gerrit2/review_site --batch --no-auto-start',
|
|
||||||
subscribe => File['/home/gerrit2/review_site/bin/gerrit.war'],
|
subscribe => File['/home/gerrit2/review_site/bin/gerrit.war'],
|
||||||
refreshonly => true,
|
refreshonly => true,
|
||||||
require => [Package['openjdk-6-jre-headless'],
|
require => [Package['openjdk-6-jre-headless'],
|
||||||
|
@ -5,8 +5,7 @@ class gerrit::remotes($ensure=present) {
|
|||||||
ensure => $ensure,
|
ensure => $ensure,
|
||||||
user => 'gerrit2',
|
user => 'gerrit2',
|
||||||
minute => '*/30',
|
minute => '*/30',
|
||||||
command => 'sleep $((RANDOM\%60+90)) && python \
|
command => 'sleep $((RANDOM\%60+90)) && python /usr/local/gerrit/scripts/fetch_remotes.py',
|
||||||
/usr/local/gerrit/scripts/fetch_remotes.py',
|
|
||||||
require => File['/usr/local/gerrit/scripts'],
|
require => File['/usr/local/gerrit/scripts'],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,19 +50,16 @@ define lodgeit::site(
|
|||||||
}
|
}
|
||||||
|
|
||||||
exec { "create_database_${name}":
|
exec { "create_database_${name}":
|
||||||
command => "drizzle --user=root \
|
command => "drizzle --user=root -e \"create database if not exists ${name};\"",
|
||||||
-e \"create database if not exists ${name};\"",
|
|
||||||
path => '/bin:/usr/bin',
|
path => '/bin:/usr/bin',
|
||||||
unless => 'drizzle --disable-column-names -r --batch \
|
unless => 'drizzle --disable-column-names -r --batch -e "show databases like \'openstack\'" | grep -q openstack',
|
||||||
-e "show databases like \'openstack\'" | grep -q openstack',
|
|
||||||
require => Service['drizzle'],
|
require => Service['drizzle'],
|
||||||
}
|
}
|
||||||
|
|
||||||
# create a backup .sql file in git
|
# create a backup .sql file in git
|
||||||
|
|
||||||
exec { "create_db_backup_${name}":
|
exec { "create_db_backup_${name}":
|
||||||
command => "touch ${name}.sql && git add ${name}.sql && git commit \
|
command => "touch ${name}.sql && git add ${name}.sql && git commit -am \"Initial commit for ${name}\"",
|
||||||
-am \"Initial commit for ${name}\"",
|
|
||||||
cwd => '/var/backups/lodgeit_db/',
|
cwd => '/var/backups/lodgeit_db/',
|
||||||
path => '/bin:/usr/bin',
|
path => '/bin:/usr/bin',
|
||||||
onlyif => "test ! -f /var/backups/lodgeit_db/${name}.sql",
|
onlyif => "test ! -f /var/backups/lodgeit_db/${name}.sql",
|
||||||
@ -74,9 +71,7 @@ define lodgeit::site(
|
|||||||
user => root,
|
user => root,
|
||||||
hour => 6,
|
hour => 6,
|
||||||
minute => 23,
|
minute => 23,
|
||||||
command => "sleep $((RANDOM\\%60+60)) && cd /var/backups/lodgeit_db \
|
command => "sleep $((RANDOM\\%60+60)) && cd /var/backups/lodgeit_db && drizzledump -uroot ${name} > ${name}.sql && git commit -qam \"Updating DB backup for ${name}\""
|
||||||
&& drizzledump -uroot ${name} > ${name}.sql \
|
|
||||||
&& git commit -qam \"Updating DB backup for ${name}\""
|
|
||||||
}
|
}
|
||||||
|
|
||||||
service { "${name}-paste":
|
service { "${name}-paste":
|
||||||
|
@ -49,9 +49,7 @@ class openstack_project::cacti (
|
|||||||
}
|
}
|
||||||
|
|
||||||
exec { 'cacti_import_xml':
|
exec { 'cacti_import_xml':
|
||||||
command => '/usr/bin/php -q /usr/share/cacti/cli/import_template.php \
|
command => '/usr/bin/php -q /usr/share/cacti/cli/import_template.php --filename=/var/lib/cacti/linux_host.xml --with-template-rras',
|
||||||
--filename=/var/lib/cacti/linux_host.xml \
|
|
||||||
--with-template-rras',
|
|
||||||
cwd => '/usr/share/cacti/cli',
|
cwd => '/usr/share/cacti/cli',
|
||||||
require => File['/var/lib/cacti/linux_host.xml'],
|
require => File['/var/lib/cacti/linux_host.xml'],
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user