puppet: Fix puppet-lint warnings in various manifests.

Apparently, `puppet-lint` on Ubuntu trusty throws warnings for certain
quoting patterns that are OK in modern `puppet-lint`.  I believe the
old Zulip code was actually correct (i.e. the old `puppet-lint`
implementation was the problem), but it seems worth changing anyway to
suppress the warnings.

We also exclude more of puppet-apt from linting, since it's
third-party code.
This commit is contained in:
Tim Abbott
2018-08-28 13:44:40 -07:00
parent 54e90deda8
commit 2c7f9ce0fc
4 changed files with 5 additions and 4 deletions

View File

@@ -17,7 +17,7 @@ class zulip::redis {
}
exec { 'rediscleanup':
onlyif => "echo '80a4cee76bac751576c3db8916fc50a6ea319428 /etc/redis/redis.conf' | sha1sum -c",
onlyif => 'echo "80a4cee76bac751576c3db8916fc50a6ea319428 /etc/redis/redis.conf" | sha1sum -c',
command => 'head -n-3 /etc/redis/redis.conf | sponge /etc/redis/redis.conf',
}

View File

@@ -45,7 +45,7 @@ class zulip::supervisor {
# We use supervisor[d] as the pattern so the bash/grep commands don't match.
hasrestart => true,
# lint:ignore:140chars
restart => "bash -c 'if pgrep -f supervisor[d] >/dev/null; then supervisorctl reread && supervisorctl update; else /etc/init.d/supervisor start; fi'"
restart => 'bash -c "if pgrep -f supervisor[d] >/dev/null; then supervisorctl reread && supervisorctl update; else /etc/init.d/supervisor start; fi"'
# lint:endignore
}
}

View File

@@ -126,12 +126,12 @@ class zulip_ops::nagios {
exec { 'fix_nagios_permissions':
command => 'dpkg-statoverride --update --add nagios www-data 2710 /var/lib/nagios3/rw',
unless => "bash -c 'ls -ld /var/lib/nagios3/rw | grep ^drwx--s--- -q'",
unless => 'bash -c "ls -ld /var/lib/nagios3/rw | grep ^drwx--s--- -q"',
notify => Service['nagios3'],
}
exec { 'fix_nagios_permissions2':
command => 'dpkg-statoverride --update --add nagios nagios 751 /var/lib/nagios3',
unless => "bash -c 'ls -ld /var/lib/nagios3 | grep ^drwxr-x--x -q'",
unless => 'bash -c "ls -ld /var/lib/nagios3 | grep ^drwxr-x--x -q"',
notify => Service['nagios3'],
}

View File

@@ -5,6 +5,7 @@ EXCLUDED_FILES = [
"puppet/apt/README.md",
"puppet/apt/manifests/backports.pp",
"puppet/apt/manifests/params.pp",
"puppet/apt/manifests/release.pp",
"puppet/apt/manifests/unattended_upgrades.pp",
"puppet/stdlib/tests/file_line.pp",
"static/third",