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:
Jeremy Stanley 2012-11-11 04:57:19 +00:00 committed by Jenkins
parent 16c0b4afc4
commit d1f76c1b99
6 changed files with 21 additions and 34 deletions

View File

@ -1,2 +1,4 @@
require 'rubygems'
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'
PuppetLint.configuration.send('disable_80chars')

View File

@ -9,27 +9,24 @@ class gerrit::cron(
user => 'gerrit2',
hour => '6',
minute => '3',
command => "python /usr/local/gerrit/scripts/expire_old_reviews.py \
${script_user} ${script_key_file}",
command => "python /usr/local/gerrit/scripts/expire_old_reviews.py ${script_user} ${script_key_file}",
require => File['/usr/local/gerrit/scripts'],
}
cron { 'gerrit_repack':
user => 'gerrit2',
weekday => '0',
hour => '4',
minute => '7',
command => 'find /home/gerrit2/review_site/git/ -type d -name "*.git" \
-print -exec git --git-dir="{}" repack -afd \;',
user => 'gerrit2',
weekday => '0',
hour => '4',
minute => '7',
command => 'find /home/gerrit2/review_site/git/ -type d -name "*.git" -print -exec git --git-dir="{}" repack -afd \;',
environment => 'PATH=/usr/bin:/bin:/usr/sbin:/sbin',
}
cron { 'removedbdumps':
user => 'gerrit2',
hour => '5',
minute => '1',
command => 'find /home/gerrit2/dbupdates/ -name "*.sql.gz" -mtime +30 \
-exec rm -f {} \;',
user => 'gerrit2',
hour => '5',
minute => '1',
command => 'find /home/gerrit2/dbupdates/ -name "*.sql.gz" -mtime +30 -exec rm -f {} \;',
environment => 'PATH=/usr/bin:/bin:/usr/sbin:/sbin',
}
}

View File

@ -223,8 +223,7 @@ class gerrit(
exec { 'make_local_repos':
user => 'gerrit2',
command => "/usr/local/gerrit/scripts/make_local_repos.py \
${local_git_dir}",
command => "/usr/local/gerrit/scripts/make_local_repos.py ${local_git_dir}",
subscribe => File['/home/gerrit2/projects.yaml'],
refreshonly => true,
require => File['/home/gerrit2/projects.yaml'],
@ -418,8 +417,7 @@ class gerrit(
# If gerrit.war was just installed, run the Gerrit "init" command.
exec { 'gerrit-initial-init':
user => 'gerrit2',
command => '/usr/bin/java -jar /home/gerrit2/review_site/bin/gerrit.war \
init -d /home/gerrit2/review_site --batch --no-auto-start',
command => '/usr/bin/java -jar /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'],
require => [Package['openjdk-6-jre-headless'],
User['gerrit2'],
@ -436,9 +434,7 @@ class gerrit(
# Running the init script as the gerrit2 user _does_ work.
exec { 'gerrit-init':
user => 'gerrit2',
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',
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',
subscribe => File['/home/gerrit2/review_site/bin/gerrit.war'],
refreshonly => true,
require => [Package['openjdk-6-jre-headless'],

View File

@ -5,8 +5,7 @@ class gerrit::remotes($ensure=present) {
ensure => $ensure,
user => 'gerrit2',
minute => '*/30',
command => 'sleep $((RANDOM\%60+90)) && python \
/usr/local/gerrit/scripts/fetch_remotes.py',
command => 'sleep $((RANDOM\%60+90)) && python /usr/local/gerrit/scripts/fetch_remotes.py',
require => File['/usr/local/gerrit/scripts'],
}

View File

@ -50,19 +50,16 @@ define lodgeit::site(
}
exec { "create_database_${name}":
command => "drizzle --user=root \
-e \"create database if not exists ${name};\"",
command => "drizzle --user=root -e \"create database if not exists ${name};\"",
path => '/bin:/usr/bin',
unless => 'drizzle --disable-column-names -r --batch \
-e "show databases like \'openstack\'" | grep -q openstack',
unless => 'drizzle --disable-column-names -r --batch -e "show databases like \'openstack\'" | grep -q openstack',
require => Service['drizzle'],
}
# create a backup .sql file in git
exec { "create_db_backup_${name}":
command => "touch ${name}.sql && git add ${name}.sql && git commit \
-am \"Initial commit for ${name}\"",
command => "touch ${name}.sql && git add ${name}.sql && git commit -am \"Initial commit for ${name}\"",
cwd => '/var/backups/lodgeit_db/',
path => '/bin:/usr/bin',
onlyif => "test ! -f /var/backups/lodgeit_db/${name}.sql",
@ -74,9 +71,7 @@ define lodgeit::site(
user => root,
hour => 6,
minute => 23,
command => "sleep $((RANDOM\\%60+60)) && cd /var/backups/lodgeit_db \
&& drizzledump -uroot ${name} > ${name}.sql \
&& git commit -qam \"Updating DB backup for ${name}\""
command => "sleep $((RANDOM\\%60+60)) && cd /var/backups/lodgeit_db && drizzledump -uroot ${name} > ${name}.sql && git commit -qam \"Updating DB backup for ${name}\""
}
service { "${name}-paste":

View File

@ -49,9 +49,7 @@ class openstack_project::cacti (
}
exec { 'cacti_import_xml':
command => '/usr/bin/php -q /usr/share/cacti/cli/import_template.php \
--filename=/var/lib/cacti/linux_host.xml \
--with-template-rras',
command => '/usr/bin/php -q /usr/share/cacti/cli/import_template.php --filename=/var/lib/cacti/linux_host.xml --with-template-rras',
cwd => '/usr/share/cacti/cli',
require => File['/var/lib/cacti/linux_host.xml'],
}