Dzahn has uploaded a new change for review.
https://gerrit.wikimedia.org/r/189898
Change subject: fix all 'variable not enclosed by {}'
......................................................................
fix all 'variable not enclosed by {}'
Fix all occurences of variables not enclosed in {}.
(except submodules)
Change-Id: Ie9788d54ab8555eedcaa0d08413ac59676c07bc6
---
M modules/extdist/manifests/init.pp
M modules/graphite/manifests/web.pp
M modules/gridengine/manifests/collector.pp
M modules/gridengine/manifests/init.pp
M modules/gridengine/manifests/master.pp
M modules/gridengine/manifests/resource.pp
M modules/gridengine/manifests/resourcedir.pp
M modules/gridengine/manifests/shadow_master.pp
M modules/interface/manifests/rps.pp
M modules/interface/manifests/txqueuelen.pp
M modules/keyholder/manifests/monitoring.pp
M modules/labs_lvm/manifests/extend.pp
M modules/labs_lvm/manifests/init.pp
M modules/labs_lvm/manifests/volume.pp
M modules/lvs/manifests/interface-tweaks.pp
M modules/mediawiki/manifests/users.pp
M modules/mediawiki_singlenode/manifests/init.pp
M modules/monitoring/manifests/graphite_anomaly.pp
M modules/monitoring/manifests/service.pp
M modules/mysql_wmf/manifests/monitor/percona/files.pp
M modules/nagios_common/manifests/check/ganglia.pp
M modules/nagios_common/manifests/check_command.pp
M modules/nagios_common/manifests/commands.pp
M modules/nagios_common/manifests/contacts.pp
M modules/nagios_common/manifests/notification_commands.pp
M modules/nagios_common/manifests/timeperiods.pp
M modules/nagios_common/manifests/user_macros.pp
M modules/openstack/manifests/nova/partition.pp
M modules/osm/manifests/planet_sync.pp
M modules/postgresql/manifests/server.pp
M modules/postgresql/manifests/user.pp
M modules/protoproxy/manifests/localssl.pp
M modules/puppet/manifests/self/geoip.pp
M modules/puppetception/manifests/init.pp
M modules/puppetmaster/manifests/geoip.pp
M modules/puppetmaster/manifests/gitclone.pp
M modules/puppetmaster/manifests/scripts.pp
M modules/puppetmaster/manifests/ssl.pp
M modules/quarry/manifests/init.pp
M modules/quarry/manifests/web.pp
M modules/releases/manifests/init.pp
M modules/servermon/manifests/init.pp
M modules/shinken/manifests/config.pp
M modules/ssh/manifests/hostkeys-collect.pp
M modules/swift_new/manifests/init_device.pp
M modules/swift_new/manifests/monitoring/graphite.pp
46 files changed, 113 insertions(+), 113 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/98/189898/1
diff --git a/modules/extdist/manifests/init.pp
b/modules/extdist/manifests/init.pp
index 550e2cb..51be2c0 100644
--- a/modules/extdist/manifests/init.pp
+++ b/modules/extdist/manifests/init.pp
@@ -108,7 +108,7 @@
}
cron { 'skindist-generate-tarballs':
- command => "/usr/bin/python $clone_dir/nightly.py --all --skins",
+ command => "/usr/bin/python ${clone_dir}/nightly.py --all --skins",
user => 'extdist',
minute => '30',
hour => '*',
diff --git a/modules/graphite/manifests/web.pp
b/modules/graphite/manifests/web.pp
index f112f65..715b8a6 100644
--- a/modules/graphite/manifests/web.pp
+++ b/modules/graphite/manifests/web.pp
@@ -109,7 +109,7 @@
'master' => true,
'processes' => $uwsgi_processes,
'cgroup' => '/sys/fs/cgroup/memory/graphite-web',
- 'cgroup-opt' => "memory.limit_in_bytes=$max_memory",
+ 'cgroup-opt' => "memory.limit_in_bytes=${max_memory}",
},
},
require => File['/var/log/graphite-web'],
diff --git a/modules/gridengine/manifests/collector.pp
b/modules/gridengine/manifests/collector.pp
index 21b904d..14cad3f 100644
--- a/modules/gridengine/manifests/collector.pp
+++ b/modules/gridengine/manifests/collector.pp
@@ -7,9 +7,9 @@
$config = undef )
{
$etcdir = '/var/lib/gridengine/etc'
- $conf = "$etcdir/$dir/$rname"
- $dotfile = "$etcdir/$dir/.$rname"
- $tracker = "$etcdir/tracker/$dir/$rname"
+ $conf = "${etcdir}/${dir}/${rname}"
+ $dotfile = "${etcdir}/${dir}/.${rname}"
+ $tracker = "${etcdir}/tracker/${dir}/${rname}"
file { $dotfile:
ensure => file,
@@ -19,8 +19,8 @@
content => template($config),
}
- exec { "collect-$rname-resource":
- command => "$etcdir/bin/collector '$rname' '$sourcedir' '$dotfile'
'$conf'",
+ exec { "collect-${rname}-resource":
+ command => "${etcdir}/bin/collector '${rname}' '${sourcedir}'
'${dotfile}' '${conf}'",
require => File[$dotfile],
}
diff --git a/modules/gridengine/manifests/init.pp
b/modules/gridengine/manifests/init.pp
index 9c1a063..e4a809f 100644
--- a/modules/gridengine/manifests/init.pp
+++ b/modules/gridengine/manifests/init.pp
@@ -48,14 +48,14 @@
purge => true,
}
- file { "$etcdir/hosts":
+ file { "${etcdir}/hosts":
ensure => directory,
owner => 'root',
group => 'root',
mode => '0755',
}
- file { "$etcdir/hosts/${::fqdn}":
+ file { "${etcdir}/hosts/${::fqdn}":
ensure => directory,
owner => 'root',
group => 'root',
diff --git a/modules/gridengine/manifests/master.pp
b/modules/gridengine/manifests/master.pp
index 078fed1..876841e 100644
--- a/modules/gridengine/manifests/master.pp
+++ b/modules/gridengine/manifests/master.pp
@@ -9,14 +9,14 @@
$etcdir = '/var/lib/gridengine/etc'
- file { "$etcdir/tracker":
+ file { "${etcdir}/tracker":
ensure => directory,
owner => 'sgeadmin',
group => 'sgeadmin',
mode => '0775',
}
- file { "$etcdir/bin":
+ file { "${etcdir}/bin":
ensure => directory,
owner => 'root',
group => 'root',
@@ -26,7 +26,7 @@
purge => true,
}
- file { "$etcdir/bin/mergeconf":
+ file { "${etcdir}/bin/mergeconf":
ensure => file,
owner => 'root',
group => 'root',
@@ -34,7 +34,7 @@
source => 'puppet:///modules/gridengine/mergeconf',
}
- file { "$etcdir/bin/tracker":
+ file { "${etcdir}/bin/tracker":
ensure => file,
owner => 'root',
group => 'root',
@@ -42,7 +42,7 @@
source => 'puppet:///modules/gridengine/tracker',
}
- file { "$etcdir/bin/collector":
+ file { "${etcdir}/bin/collector":
ensure => file,
owner => 'root',
group => 'root',
@@ -87,9 +87,9 @@
delcmd => '/usr/bin/qconf -dh',
}
- file { "$etcdir/complex":
+ file { "${etcdir}/complex":
ensure => directory,
- force => true,
+ force => true,
owner => 'sgeadmin',
group => 'sgeadmin',
mode => '0775',
@@ -97,7 +97,7 @@
purge => true,
}
- file { "$etcdir/complex/99-default":
+ file { "${etcdir}/complex/99-default":
ensure => file,
owner => 'sgeadmin',
group => 'sgeadmin',
@@ -106,12 +106,12 @@
}
exec { "update-complex-conf":
- onlyif => "$etcdir/bin/mergeconf $etcdir/complex.conf
$etcdir/complex/*",
- command => "/bin/echo /usr/bin/qconf -Mc $etcdir/complex.conf'",
- require => File[ "$etcdir/bin", "$etcdir/complex/99-default" ],
+ onlyif => "${etcdir}/bin/mergeconf ${etcdir}/complex.conf
${etcdir}/complex/*",
+ command => "/bin/echo /usr/bin/qconf -Mc ${etcdir}/complex.conf'",
+ require => File[ "${etcdir}/bin", "${etcdir}/complex/99-default" ],
}
- file { "$etcdir/config":
+ file { "${etcdir}/config":
ensure => directory,
force => true,
owner => 'sgeadmin',
@@ -121,7 +121,7 @@
purge => true,
}
- file { "$etcdir/config/99-default":
+ file { "${etcdir}/config/99-default":
ensure => file,
owner => 'sgeadmin',
group => 'sgeadmin',
@@ -130,9 +130,9 @@
}
exec { "update-config-conf":
- onlyif => "$etcdir/bin/mergeconf $etcdir/config.conf
$etcdir/config/*",
- command => "/bin/echo /usr/bin/qconf -Mconf $etcdir/config.conf",
- require => File[ "$etcdir/bin", "$etcdir/complex/99-default" ],
+ onlyif => "${etcdir}/bin/mergeconf ${etcdir}/config.conf
${etcdir}/config/*",
+ command => "/bin/echo /usr/bin/qconf -Mconf ${etcdir}/config.conf",
+ require => File[ "${etcdir}/bin", "${etcdir}/complex/99-default" ],
}
}
diff --git a/modules/gridengine/manifests/resource.pp
b/modules/gridengine/manifests/resource.pp
index 52b57ba..8910399 100644
--- a/modules/gridengine/manifests/resource.pp
+++ b/modules/gridengine/manifests/resource.pp
@@ -6,7 +6,7 @@
$config = undef )
{
$etcdir = '/var/lib/gridengine/etc'
- $conf = "$etcdir/$dir/$rname"
+ $conf = "${etcdir}/${dir}/${rname}"
if $config {
file { $conf:
diff --git a/modules/gridengine/manifests/resourcedir.pp
b/modules/gridengine/manifests/resourcedir.pp
index e43c636..7949025 100644
--- a/modules/gridengine/manifests/resourcedir.pp
+++ b/modules/gridengine/manifests/resourcedir.pp
@@ -5,8 +5,8 @@
$addcmd, $modcmd, $delcmd)
{
$etcdir = '/var/lib/gridengine/etc'
- $confdir = "$etcdir/$dir"
- $trackerdir = "$etcdir/tracker/$dir"
+ $confdir = "${etcdir}/${dir}"
+ $trackerdir = "${etcdir}/tracker/${dir}"
file { $confdir:
@@ -29,9 +29,9 @@
purge => false,
}
- exec { "track-$dir":
- command => "$etcdir/bin/tracker '$confdir' '$trackerdir' '$addcmd'
'$modcmd' '$delcmd'",
- require => File[ "$etcdir/bin/tracker", $confdir, $trackerdir ],
+ exec { "track-${dir}":
+ command => "${etcdir}/bin/tracker '${confdir}' '${trackerdir}'
'${addcmd}' '${modcmd}' '${delcmd}'",
+ require => File[ "${etcdir}/bin/tracker", $confdir, $trackerdir ],
}
}
diff --git a/modules/gridengine/manifests/shadow_master.pp
b/modules/gridengine/manifests/shadow_master.pp
index 98dc070..3a78d03 100644
--- a/modules/gridengine/manifests/shadow_master.pp
+++ b/modules/gridengine/manifests/shadow_master.pp
@@ -10,7 +10,7 @@
require => Package['gridengine-common'],
}
- file { "$sgeroot/default":
+ file { "${sgeroot}/default":
require => [ File[$sgeroot], Package['gridengine-common'] ],
ensure => directory,
owner => 'sgeadmin',
@@ -18,8 +18,8 @@
mode => '02775',
}
- file { "$sgeroot/default/common":
- require => File["$sgeroot/default"],
+ file { "${sgeroot}/default/common":
+ require => File["${sgeroot}/default"],
ensure => directory,
owner => 'sgeadmin',
group => 'sgeadmin',
@@ -44,8 +44,8 @@
source => 'puppet:///modules/gridengine/gridengine-shadow.conf';
}
- file { "$sgeroot/default/common/shadow_masters":
- require => File["$sgeroot/default/common"],
+ file { "${sgeroot}/default/common/shadow_masters":
+ require => File["${sgeroot}/default/common"],
ensure => present,
owner => 'sgeadmin',
group => 'sgeadmin',
@@ -54,7 +54,7 @@
}
service { 'gridengine-shadow':
- require => File['/etc/init/gridengine-shadow.conf',
"$sgeroot/default/common/shadow_masters"],
+ require => File['/etc/init/gridengine-shadow.conf',
"${sgeroot}/default/common/shadow_masters"],
ensure => running,
}
}
diff --git a/modules/interface/manifests/rps.pp
b/modules/interface/manifests/rps.pp
index b7f78a7..62899d7 100644
--- a/modules/interface/manifests/rps.pp
+++ b/modules/interface/manifests/rps.pp
@@ -16,10 +16,10 @@
$interface = $title
if $rss_pattern != "" {
- $cmd = "/usr/local/sbin/interface-rps $interface $rss_pattern"
+ $cmd = "/usr/local/sbin/interface-rps ${interface} ${rss_pattern}"
}
else {
- $cmd = "/usr/local/sbin/interface-rps $interface"
+ $cmd = "/usr/local/sbin/interface-rps ${interface}"
}
# Disable irqbalance if RSS in use
@@ -28,13 +28,13 @@
}
# Add to ifup commands in /etc/network/interfaces
- interface::up_command { "rps-$interface":
+ interface::up_command { "rps-${interface}":
interface => $interface,
command => $cmd,
}
# Exec immediately if newly-added
- exec { "rps-$interface":
+ exec { "rps-${interface}":
command => $cmd,
subscribe => Augeas["${interface}_rps-${interface}"],
refreshonly => true,
diff --git a/modules/interface/manifests/txqueuelen.pp
b/modules/interface/manifests/txqueuelen.pp
index 9704e5c..e2f4bdb 100644
--- a/modules/interface/manifests/txqueuelen.pp
+++ b/modules/interface/manifests/txqueuelen.pp
@@ -8,19 +8,19 @@
# - $len:
# desired transmit queue length
define interface::txqueuelen($len) {
- $sysfs_txqlen = "/sys/class/net/$name/tx_queue_len"
- $setcmd = "echo $len > $sysfs_txqlen"
+ $sysfs_txqlen = "/sys/class/net/${name}/tx_queue_len"
+ $setcmd = "echo ${len} > ${sysfs_txqlen}"
# Set in /etc/network/interfaces
- interface::up_command { "txqueuelen-$name":
+ interface::up_command { "txqueuelen-${name}":
interface => $name,
command => $setcmd,
}
# And make sure it's always active
- exec { "txqueuelen-$name":
+ exec { "txqueuelen-${name}":
path => '/usr/bin:/usr/sbin:/bin:/sbin',
command => $setcmd,
- unless => "test `cat $sysfs_txqlen` = $len",
+ unless => "test `cat ${sysfs_txqlen}` = ${len}",
}
}
diff --git a/modules/keyholder/manifests/monitoring.pp
b/modules/keyholder/manifests/monitoring.pp
index 15d48ec..9f7e632 100644
--- a/modules/keyholder/manifests/monitoring.pp
+++ b/modules/keyholder/manifests/monitoring.pp
@@ -19,14 +19,14 @@
sudo::user { 'nagios_check_keyholder':
ensure => $ensure,
user => 'nagios',
- privileges => [ "ALL = NOPASSWD: $plugin_path" ],
+ privileges => [ "ALL = NOPASSWD: ${plugin_path}" ],
require => File[$plugin_path],
}
nrpe::monitor_service { 'keyholder':
ensure => $ensure,
description => 'Keyholder SSH agent',
- nrpe_command => "/usr/bin/sudo $plugin_path",
+ nrpe_command => "/usr/bin/sudo ${plugin_path}",
require => Sudo::User['nagios_check_keyholder'],
}
}
diff --git a/modules/labs_lvm/manifests/extend.pp
b/modules/labs_lvm/manifests/extend.pp
index c1b1289..99d2c49 100644
--- a/modules/labs_lvm/manifests/extend.pp
+++ b/modules/labs_lvm/manifests/extend.pp
@@ -24,10 +24,10 @@
$size = '100%FREE',
) {
- exec { "extend-vd-$mountat":
+ exec { "extend-vd-${mountat}":
logoutput => 'on_failure',
require => File['/usr/local/sbin/extend-instance-vol'],
- command => "/usr/local/sbin/extend-instance-vol '$mountat'
'$size'",
+ command => "/usr/local/sbin/extend-instance-vol '${mountat}'
'${size}'",
}
}
diff --git a/modules/labs_lvm/manifests/init.pp
b/modules/labs_lvm/manifests/init.pp
index 85eb8e1..33e5ee4 100644
--- a/modules/labs_lvm/manifests/init.pp
+++ b/modules/labs_lvm/manifests/init.pp
@@ -48,7 +48,7 @@
logoutput => 'on_failure',
unless => '/sbin/vgdisplay -c vd',
require => File['/usr/local/sbin/make-instance-vg'],
- command => "/usr/local/sbin/make-instance-vg '$disk'",
+ command => "/usr/local/sbin/make-instance-vg '${disk}'",
}
}
diff --git a/modules/labs_lvm/manifests/volume.pp
b/modules/labs_lvm/manifests/volume.pp
index 89d0a0a..dd21aa5 100644
--- a/modules/labs_lvm/manifests/volume.pp
+++ b/modules/labs_lvm/manifests/volume.pp
@@ -28,7 +28,7 @@
define labs_lvm::volume(
$volname = $title,
- $mountat = "/mnt/$volname",
+ $mountat = "/mnt/${volname}",
$mountowner = 'root',
$mountgroup = 'root',
$mountmode = '755',
@@ -37,15 +37,15 @@
$mkfs_opt = '',
$options = 'defaults',
) {
- exec { "create-vd-$volname":
- creates => "/dev/vd/$volname",
- unless => "/bin/mountpoint -q '$mountat'",
+ exec { "create-vd-${volname}":
+ creates => "/dev/vd/${volname}",
+ unless => "/bin/mountpoint -q '${mountat}'",
logoutput => 'on_failure',
require => [
File['/usr/local/sbin/make-instance-vol'],
Exec['create-volume-group']
],
- command => "/usr/local/sbin/make-instance-vol '$volname' '$size'
'$fstype' $mkfs_opt",
+ command => "/usr/local/sbin/make-instance-vol '${volname}'
'${size}' '${fstype}' ${mkfs_opt}",
}
file { $mountat:
@@ -58,11 +58,11 @@
mount { $mountat:
ensure => mounted,
atboot => true,
- device => "/dev/vd/$volname",
+ device => "/dev/vd/${volname}",
options => $options,
fstype => $fstype,
require => [
- Exec["create-vd-$volname"],
+ Exec["create-vd-${volname}"],
File[$mountat],
],
}
diff --git a/modules/lvs/manifests/interface-tweaks.pp
b/modules/lvs/manifests/interface-tweaks.pp
index f051005..09351ff 100644
--- a/modules/lvs/manifests/interface-tweaks.pp
+++ b/modules/lvs/manifests/interface-tweaks.pp
@@ -8,10 +8,10 @@
# Disable GRO (generically incompatible with LVS due to kernel issues, I
believe this
# is now fixed upstream for both ipv4 and ipv6 as of kernel 3.7 or
higher, but
# that idea needs testing!)
- interface::offload { "$name gro": interface => $name, setting => 'gro',
value => 'off' }
+ interface::offload { "${name} gro": interface => $name, setting => 'gro',
value => 'off' }
if $name != 'eth0' {
# Make sure GRO is off for the non-primary interfaces...
- interface::manual { $name: interface => $name, before =>
Interface::Offload["$name gro"] }
+ interface::manual { $name: interface => $name, before =>
Interface::Offload["${name} gro"] }
}
# RSS/RPS/XPS-type perf stuff (
https://www.kernel.org/doc/Documentation/networking/scaling.txt )
@@ -23,8 +23,8 @@
# bnx2x-specific stuff
if $bnx2x {
# bnx2x is buggy with TPA (LRO) + LVS
- interface::offload { "$name lro": interface => $name, setting =>
'lro', value => 'off' }
+ interface::offload { "${name} lro": interface => $name, setting =>
'lro', value => 'off' }
# Max for bnx2x/BCM57800, seems to eliminate the spurious rx drops
under heavy traffic
- interface::ring { "$name rxring": interface => $name, setting => 'rx',
value => 4078 }
+ interface::ring { "${name} rxring": interface => $name, setting =>
'rx', value => 4078 }
}
}
diff --git a/modules/mediawiki/manifests/users.pp
b/modules/mediawiki/manifests/users.pp
index 257069b..005d152 100644
--- a/modules/mediawiki/manifests/users.pp
+++ b/modules/mediawiki/manifests/users.pp
@@ -97,7 +97,7 @@
sudo::group { 'wikidev':
privileges => [
- "ALL = ($web,mwdeploy,l10nupdate) NOPASSWD: ALL",
+ "ALL = (${web},mwdeploy,l10nupdate) NOPASSWD: ALL",
'ALL = (root) NOPASSWD: /sbin/restart hhvm',
'ALL = (root) NOPASSWD: /sbin/start hhvm',
'ALL = NOPASSWD: /usr/sbin/apache2ctl',
@@ -111,7 +111,7 @@
sudo::user { 'mwdeploy':
privileges => [
- "ALL = ($web,mwdeploy,l10nupdate) NOPASSWD: ALL",
+ "ALL = (${web},mwdeploy,l10nupdate) NOPASSWD: ALL",
'ALL = (root) NOPASSWD: /sbin/restart hhvm',
'ALL = (root) NOPASSWD: /sbin/start hhvm',
]
diff --git a/modules/mediawiki_singlenode/manifests/init.pp
b/modules/mediawiki_singlenode/manifests/init.pp
index 8acbb1a..c1f0dc6 100644
--- a/modules/mediawiki_singlenode/manifests/init.pp
+++ b/modules/mediawiki_singlenode/manifests/init.pp
@@ -39,7 +39,7 @@
git::clone { 'vendor':
ensure => $ensure,
- directory => "$install_path/vendor",
+ directory => "${install_path}/vendor",
branch => 'master',
timeout => 1800,
origin => 'https://gerrit.wikimedia.org/r/p/mediawiki/vendor.git',
diff --git a/modules/monitoring/manifests/graphite_anomaly.pp
b/modules/monitoring/manifests/graphite_anomaly.pp
index 0f072a4..f0c03a1 100644
--- a/modules/monitoring/manifests/graphite_anomaly.pp
+++ b/modules/monitoring/manifests/graphite_anomaly.pp
@@ -89,7 +89,7 @@
monitoring::service { $title:
ensure => $ensure,
description => $description,
- check_command =>
"check_graphite_anomaly!${graphite_url}!${timeout}!${metric}!${warning}!${critical}!${check_window}!$modifier",
+ check_command =>
"check_graphite_anomaly!${graphite_url}!${timeout}!${metric}!${warning}!${critical}!${check_window}!${modifier}",
retries => $retries,
group => $group,
critical => $nagios_critical,
diff --git a/modules/monitoring/manifests/service.pp
b/modules/monitoring/manifests/service.pp
index 223245e..eb40daf 100644
--- a/modules/monitoring/manifests/service.pp
+++ b/modules/monitoring/manifests/service.pp
@@ -15,7 +15,7 @@
)
{
if ! $host {
- fail("Parameter $host not defined!")
+ fail("Parameter ${host} not defined!")
}
$cluster_name = hiera('cluster', $cluster)
$servicegroups = $group ? {
diff --git a/modules/mysql_wmf/manifests/monitor/percona/files.pp
b/modules/mysql_wmf/manifests/monitor/percona/files.pp
index f138b58..43e77f3 100644
--- a/modules/mysql_wmf/manifests/monitor/percona/files.pp
+++ b/modules/mysql_wmf/manifests/monitor/percona/files.pp
@@ -6,7 +6,7 @@
include passwords::nagios::mysql
$mysql_check_pass = $passwords::nagios::mysql::mysql_check_pass
- file { "$icinga_config_dir/nrpe.d/nrpe_percona.cfg":
+ file { "${icinga_config_dir}/nrpe.d/nrpe_percona.cfg":
owner => 'root',
group => 'nagios',
mode => '0440',
diff --git a/modules/nagios_common/manifests/check/ganglia.pp
b/modules/nagios_common/manifests/check/ganglia.pp
index 6e76d48..f573bea 100644
--- a/modules/nagios_common/manifests/check/ganglia.pp
+++ b/modules/nagios_common/manifests/check/ganglia.pp
@@ -37,7 +37,7 @@
}
nagios_common::check_command::config { 'check_ganglia':
- require => File["$config_dir/commands"],
+ require => File["${config_dir}/commands"],
config_dir => $config_dir,
owner => $owner,
group => $group
diff --git a/modules/nagios_common/manifests/check_command.pp
b/modules/nagios_common/manifests/check_command.pp
index 3751881..d2ce446 100644
--- a/modules/nagios_common/manifests/check_command.pp
+++ b/modules/nagios_common/manifests/check_command.pp
@@ -33,7 +33,7 @@
define nagios_common::check_command(
$ensure = present,
$config_dir = '/etc/icinga',
- $plugin_source = "puppet:///modules/nagios_common/check_commands/$title",
+ $plugin_source = "puppet:///modules/nagios_common/check_commands/${title}",
$config_source = undef,
$config_content = undef,
$owner = 'icinga',
@@ -41,7 +41,7 @@
) {
- file { "/usr/lib/nagios/plugins/$title":
+ file { "/usr/lib/nagios/plugins/${title}":
ensure => $ensure,
source => $plugin_source,
owner => 'root',
@@ -50,7 +50,7 @@
}
if ($config_source == undef) and ($config_content == undef) {
- $real_config_source =
"puppet:///modules/nagios_common/check_commands/$title.cfg"
+ $real_config_source =
"puppet:///modules/nagios_common/check_commands/${title}.cfg"
} else {
$real_config_source = $config_source
}
@@ -103,12 +103,12 @@
$group = 'icinga',
) {
if ($source == undef) and ($content == undef) {
- $real_source =
"puppet:///modules/nagios_common/check_commands/$title.cfg"
+ $real_source =
"puppet:///modules/nagios_common/check_commands/${title}.cfg"
} else {
$real_source = $source
}
- file { "$config_dir/commands/$title.cfg":
+ file { "${config_dir}/commands/${title}.cfg":
ensure => $ensure,
source => $real_source,
content => $content,
diff --git a/modules/nagios_common/manifests/commands.pp
b/modules/nagios_common/manifests/commands.pp
index 860a229..d353e58 100644
--- a/modules/nagios_common/manifests/commands.pp
+++ b/modules/nagios_common/manifests/commands.pp
@@ -29,7 +29,7 @@
ensure => present,
}
- file { "$config_dir/commands":
+ file { "${config_dir}/commands":
ensure => directory,
owner => $owner,
group => $group,
@@ -47,7 +47,7 @@
'check_ifstatus_nomon',
'check_bgp',
] :
- require => File["$config_dir/commands"],
+ require => File["${config_dir}/commands"],
config_dir => $config_dir,
owner => $owner,
group => $group,
@@ -87,13 +87,13 @@
'procs',
'vsz',
] :
- require => File["$config_dir/commands"],
+ require => File["${config_dir}/commands"],
config_dir => $config_dir,
owner => $owner,
group => $group,
}
- file { "$config_dir/checkcommands.cfg":
+ file { "${config_dir}/checkcommands.cfg":
source => 'puppet:///modules/nagios_common/checkcommands.cfg',
owner => $owner,
group => $group,
diff --git a/modules/nagios_common/manifests/contacts.pp
b/modules/nagios_common/manifests/contacts.pp
index 9eb8cc1..573ed43 100644
--- a/modules/nagios_common/manifests/contacts.pp
+++ b/modules/nagios_common/manifests/contacts.pp
@@ -37,7 +37,7 @@
$contacts = [],
) {
if ($source != undef) {
- file { "$config_dir/contacts.cfg":
+ file { "${config_dir}/contacts.cfg":
ensure => $ensure,
source => $source,
owner => $owner,
@@ -45,7 +45,7 @@
mode => '0600', # Only $owner:$group can read/write
}
} else {
- file { "$config_dir/contacts.cfg":
+ file { "${config_dir}/contacts.cfg":
ensure => $ensure,
content => template($template),
owner => $owner,
diff --git a/modules/nagios_common/manifests/notification_commands.pp
b/modules/nagios_common/manifests/notification_commands.pp
index dbb32bb..6487153 100644
--- a/modules/nagios_common/manifests/notification_commands.pp
+++ b/modules/nagios_common/manifests/notification_commands.pp
@@ -33,7 +33,7 @@
$lover_name = 'Icinga',
$irc_dir_path = '/var/log/icinga',
) {
- file { "$config_dir/notification_commands.cfg":
+ file { "${config_dir}/notification_commands.cfg":
ensure => $ensure,
content => template('nagios_common/notification_commands.cfg.erb'),
owner => $owner,
diff --git a/modules/nagios_common/manifests/timeperiods.pp
b/modules/nagios_common/manifests/timeperiods.pp
index a80345c..7f73332 100644
--- a/modules/nagios_common/manifests/timeperiods.pp
+++ b/modules/nagios_common/manifests/timeperiods.pp
@@ -23,7 +23,7 @@
$owner = 'icinga',
$group = 'icinga',
) {
- file { "$config_dir/timeperiods.cfg":
+ file { "${config_dir}/timeperiods.cfg":
ensure => $ensure,
source => 'puppet:///modules/nagios_common/timeperiods.cfg',
owner => $owner,
diff --git a/modules/nagios_common/manifests/user_macros.pp
b/modules/nagios_common/manifests/user_macros.pp
index 75f5d1c..475b44e 100644
--- a/modules/nagios_common/manifests/user_macros.pp
+++ b/modules/nagios_common/manifests/user_macros.pp
@@ -23,7 +23,7 @@
$owner = 'icinga',
$group = 'icinga',
){
- file { "$config_dir/resource.cfg":
+ file { "${config_dir}/resource.cfg":
ensure => $ensure,
source => 'puppet:///modules/nagios_common/resource.cfg',
owner => $owner,
diff --git a/modules/openstack/manifests/nova/partition.pp
b/modules/openstack/manifests/nova/partition.pp
index 593a435..a5d6449 100644
--- a/modules/openstack/manifests/nova/partition.pp
+++ b/modules/openstack/manifests/nova/partition.pp
@@ -21,7 +21,7 @@
}
exec { "mkfs-${dev}":
- command => "mkfs -t xfs -L $fs_label -i size=512 ${dev}",
+ command => "mkfs -t xfs -L ${fs_label} -i size=512 ${dev}",
path => '/sbin/:/usr/sbin/',
require => [Package['xfsprogs'], Exec["parted-${title}"]],
unless => "xfs_admin -l ${dev}",
diff --git a/modules/osm/manifests/planet_sync.pp
b/modules/osm/manifests/planet_sync.pp
index 36d08b4..1400aa7 100644
--- a/modules/osm/manifests/planet_sync.pp
+++ b/modules/osm/manifests/planet_sync.pp
@@ -47,13 +47,13 @@
$sync_planet_cmd = inline_template("<%- [email protected](' ');
multi={'MB' => 1, 'GB' => 1000}[data[1]]-%>/usr/bin/osmosis
--read-replication-interval workingDirectory=<%= @osmosis_dir %>
--simplify-change --write-xml-change - 2>/dev/null | /usr/bin/osm2pgsql -k -s
-C <%= data[0].to_i/10*multi %> --number-processes <%= @processorcount %> -e15
-o <%= @expire_dir %>/expire.list.$(date \"+\\%Y\\%m\\%d\\%H\\%M\") --append -")
cron { "planet_sync-${name}":
environment => "JAVACMD_OPTIONS='-Dhttp.proxyHost=webproxy.eqiad.wmnet
-Dhttp.proxyPort=8080'",
- command => "$sync_planet_cmd > /tmp/osmosis.log 2>&1",
+ command => "${sync_planet_cmd} > /tmp/osmosis.log 2>&1",
user => 'postgres',
hour => $hour,
minute => $minute,
}
cron { "expire_old_planet_syncs-${name}":
- command => "/usr/bin/find $expire_dir -mtime +5 -exec rm {} \;",
+ command => "/usr/bin/find ${expire_dir} -mtime +5 -exec rm {} \;",
user => 'postgres',
hour => $hour,
minute => $minute,
diff --git a/modules/postgresql/manifests/server.pp
b/modules/postgresql/manifests/server.pp
index ed858ca..b84f797 100644
--- a/modules/postgresql/manifests/server.pp
+++ b/modules/postgresql/manifests/server.pp
@@ -39,14 +39,14 @@
}
exec { 'pgreload':
- command => "/usr/bin/pg_ctlcluster $pgversion main reload",
+ command => "/usr/bin/pg_ctlcluster ${pgversion} main reload",
user => 'postgres',
refreshonly => true,
}
service { 'postgresql':
ensure => ensure_service($ensure),
- require => Package["postgresql-$pgversion"]
+ require => Package["postgresql-${pgversion}"]
}
file { "/etc/postgresql/${pgversion}/main/postgresql.conf":
diff --git a/modules/postgresql/manifests/user.pp
b/modules/postgresql/manifests/user.pp
index c48f89f..f37691c 100644
--- a/modules/postgresql/manifests/user.pp
+++ b/modules/postgresql/manifests/user.pp
@@ -69,7 +69,7 @@
augeas { "hba_create-${name}":
context => "/files/etc/postgresql/${pgversion}/main/pg_hba.conf/",
changes => $changes,
- onlyif => "match
/files/etc/postgresql/$pgversion/main/pg_hba.conf/*/user[. = \'${user}\'] size
== 0",
+ onlyif => "match
/files/etc/postgresql/${pgversion}/main/pg_hba.conf/*/user[. = \'${user}\']
size == 0",
notify => Exec['pgreload'],
}
} elsif $ensure == 'absent' {
@@ -81,7 +81,7 @@
augeas { "hba_drop-${name}":
context => "/files/etc/postgresql/${pgversion}/main/pg_hba.conf/",
- changes => "rm
/files/etc/postgresql/$pgversion/main/pg_hba.conf/*[user = \'${user}\' ] and
[database = \'${database}\'] and [ address = \'${cidr}\']",
+ changes => "rm
/files/etc/postgresql/${pgversion}/main/pg_hba.conf/*[user = \'${user}\' ] and
[database = \'${database}\'] and [ address = \'${cidr}\']",
# only if the user exists
onlyif => "match
/files/etc/postgresql/${pgversion}/main/pg_hba.conf/*/user[. = \'${user}\']
size > 0",
notify => Exec['pgreload'],
diff --git a/modules/protoproxy/manifests/localssl.pp
b/modules/protoproxy/manifests/localssl.pp
index 5ff6177..8e757cb 100644
--- a/modules/protoproxy/manifests/localssl.pp
+++ b/modules/protoproxy/manifests/localssl.pp
@@ -31,7 +31,7 @@
# resource will conflict.
if $default_server {
notify { 'protoproxy localssl default_server':
- message => "protoproxy::localssl instance $title with server name
$server_name is the default server."
+ message => "protoproxy::localssl instance ${title} with server
name ${server_name} is the default server."
}
}
diff --git a/modules/puppet/manifests/self/geoip.pp
b/modules/puppet/manifests/self/geoip.pp
index 3d5ce46..c026528 100644
--- a/modules/puppet/manifests/self/geoip.pp
+++ b/modules/puppet/manifests/self/geoip.pp
@@ -29,19 +29,19 @@
# compatibility symlinks, so that users can use the stable paths
# GeoIP.dat/GeoIPCity.dat between labs and production
- file { "$geoip_destdir/GeoIP.dat":
+ file { "${geoip_destdir}/GeoIP.dat":
ensure => link,
target => 'GeoLiteCountry.dat',
}
- file { "$geoip_destdir/GeoIPCity.dat":
+ file { "${geoip_destdir}/GeoIPCity.dat":
ensure => link,
target => 'GeoLiteCity.dat',
}
- file { "$geoip_destdir/GeoIP2-Country.mmdb":
+ file { "${geoip_destdir}/GeoIP2-Country.mmdb":
ensure => link,
target => 'GeoLite2-Country.mmdb',
}
- file { "$geoip_destdir/GeoIP2-City.mmdb":
+ file { "${geoip_destdir}/GeoIP2-City.mmdb":
ensure => link,
target => 'GeoLite2-City.mmdb',
}
diff --git a/modules/puppetception/manifests/init.pp
b/modules/puppetception/manifests/init.pp
index 71aa29b..e281951 100644
--- a/modules/puppetception/manifests/init.pp
+++ b/modules/puppetception/manifests/init.pp
@@ -46,7 +46,7 @@
include ::role::labs::lvm::srv
$base_dir = '/srv/puppetception'
- $install_dir = "$base_dir/git"
+ $install_dir = "${base_dir}/git"
$puppet_dir = "${install_dir}${puppet_subdir}"
file { [$base_dir,
$install_dir,
diff --git a/modules/puppetmaster/manifests/geoip.pp
b/modules/puppetmaster/manifests/geoip.pp
index 23a33a1..a9017bd 100644
--- a/modules/puppetmaster/manifests/geoip.pp
+++ b/modules/puppetmaster/manifests/geoip.pp
@@ -34,19 +34,19 @@
# compatibility symlinks, so that users can use the stable paths
# GeoIP.dat/GeoIPCity.dat between labs and production
- file { "$geoip_destdir/GeoIP.dat":
+ file { "${geoip_destdir}/GeoIP.dat":
ensure => link,
target => 'GeoLiteCountry.dat',
}
- file { "$geoip_destdir/GeoIPCity.dat":
+ file { "${geoip_destdir}/GeoIPCity.dat":
ensure => link,
target => 'GeoLiteCity.dat',
}
- file { "$geoip_destdir/GeoIP2-Country.mmdb":
+ file { "${geoip_destdir}/GeoIP2-Country.mmdb":
ensure => link,
target => 'GeoLite2-Country.mmdb',
}
- file { "$geoip_destdir/GeoIP2-City.mmdb":
+ file { "${geoip_destdir}/GeoIP2-City.mmdb":
ensure => link,
target => 'GeoLite2-City.mmdb',
}
diff --git a/modules/puppetmaster/manifests/gitclone.pp
b/modules/puppetmaster/manifests/gitclone.pp
index 358d137..8ecbf30 100644
--- a/modules/puppetmaster/manifests/gitclone.pp
+++ b/modules/puppetmaster/manifests/gitclone.pp
@@ -46,7 +46,7 @@
owner => 'root',
group => 'puppet',
mode => '0750';
- "$puppetmaster::volatiledir/misc":
+ "${puppetmaster::volatiledir}/misc":
ensure => directory,
owner => 'root',
group => 'puppet',
diff --git a/modules/puppetmaster/manifests/scripts.pp
b/modules/puppetmaster/manifests/scripts.pp
index 5148d55..401087a 100644
--- a/modules/puppetmaster/manifests/scripts.pp
+++ b/modules/puppetmaster/manifests/scripts.pp
@@ -40,7 +40,7 @@
# Clear out older reports
cron { 'removeoldreports':
ensure => present,
- command => "find /var/lib/puppet/reports -type f -mmin
+$keep_reports_minutes -delete",
+ command => "find /var/lib/puppet/reports -type f -mmin
+${keep_reports_minutes} -delete",
user => puppet,
hour => [0, 8, 16], # Run every 8 hours, to prevent excess load
minute => 27, # Run at a time when hopefully no other cron jobs are
diff --git a/modules/puppetmaster/manifests/ssl.pp
b/modules/puppetmaster/manifests/ssl.pp
index 8ca6238..8dcebfe 100644
--- a/modules/puppetmaster/manifests/ssl.pp
+++ b/modules/puppetmaster/manifests/ssl.pp
@@ -42,7 +42,7 @@
}
exec { 'setup crl dir':
- require => File["$ssldir/crl"],
+ require => File["${ssldir}/crl"],
path => '/usr/sbin:/usr/bin:/sbin:/bin',
command => "ln -s ${ssldir}/ca/ca_crl.pem ${ssldir}/crl/$(openssl crl
-in ${ssldir}/ca/ca_crl.pem -hash -noout).0",
onlyif => "test ! -L ${ssldir}/crl/$(openssl crl -in
${ssldir}/ca/ca_crl.pem -hash -noout).0"
diff --git a/modules/quarry/manifests/init.pp b/modules/quarry/manifests/init.pp
index 0ff89e9..6111d57 100644
--- a/modules/quarry/manifests/init.pp
+++ b/modules/quarry/manifests/init.pp
@@ -85,7 +85,7 @@
}
cron { 'query-killer':
- command => "$clone_path/quarry/web/killer.py",
+ command => "${clone_path}/quarry/web/killer.py",
minute => '*',
user => 'quarry',
}
diff --git a/modules/quarry/manifests/web.pp b/modules/quarry/manifests/web.pp
index 3d48fcb..40094f8 100644
--- a/modules/quarry/manifests/web.pp
+++ b/modules/quarry/manifests/web.pp
@@ -14,7 +14,7 @@
settings => {
uwsgi => {
'socket' => '/run/uwsgi/quarry-web.sock',
- 'wsgi-file' => "$clone_path/quarry.wsgi",
+ 'wsgi-file' => "${clone_path}/quarry.wsgi",
'master' => true,
'processes' => 8,
'chdir' => $clone_path,
diff --git a/modules/releases/manifests/init.pp
b/modules/releases/manifests/init.pp
index 5c83c81..bbf6236 100644
--- a/modules/releases/manifests/init.pp
+++ b/modules/releases/manifests/init.pp
@@ -48,7 +48,7 @@
include 'webserver::apache'
include ::apache::mod::rewrite
@webserver::apache::site { $sitename:
- docroot => "/srv/org/wikimedia/$docroot/",
+ docroot => "/srv/org/wikimedia/${docroot}/",
server_admin => $server_admin,
require => [
Class['::apache::mod::rewrite'],
diff --git a/modules/servermon/manifests/init.pp
b/modules/servermon/manifests/init.pp
index 6f7277e..0f6130b 100644
--- a/modules/servermon/manifests/init.pp
+++ b/modules/servermon/manifests/init.pp
@@ -68,7 +68,7 @@
ensure => ensure_service($ensure),
}
- file { "$directory/settings.py":
+ file { "${directory}/settings.py":
ensure => $ensure,
owner => 'root',
group => 'root',
diff --git a/modules/shinken/manifests/config.pp
b/modules/shinken/manifests/config.pp
index 6d3174d..a63bb12 100644
--- a/modules/shinken/manifests/config.pp
+++ b/modules/shinken/manifests/config.pp
@@ -6,7 +6,7 @@
) {
include shinken
- file { "/etc/shinken/customconfig/$title.cfg":
+ file { "/etc/shinken/customconfig/${title}.cfg":
ensure => $ensure,
source => $source,
owner => 'shinken',
diff --git a/modules/ssh/manifests/hostkeys-collect.pp
b/modules/ssh/manifests/hostkeys-collect.pp
index 1d1fe03..69c8119 100644
--- a/modules/ssh/manifests/hostkeys-collect.pp
+++ b/modules/ssh/manifests/hostkeys-collect.pp
@@ -2,7 +2,7 @@
# Do this about twice a day
$potm = inline_template('<%= srand ; (rand(25) == 5).to_s.capitalize -%>')
if $hostname == "tin" or $hostname == "bast1001" or $potm == "True" {
- notice("Collecting SSH host keys on $hostname.")
+ notice("Collecting SSH host keys on ${hostname}.")
# install all collected SSH host keys
Sshkey <<| |>>
diff --git a/modules/swift_new/manifests/init_device.pp
b/modules/swift_new/manifests/init_device.pp
index 5e6c2b8..a7001ce 100644
--- a/modules/swift_new/manifests/init_device.pp
+++ b/modules/swift_new/manifests/init_device.pp
@@ -17,7 +17,7 @@
}
exec { "mkfs-${dev}":
- command => "mkfs -t xfs -L $fs_label -i size=512 ${dev}",
+ command => "mkfs -t xfs -L ${fs_label} -i size=512 ${dev}",
path => '/sbin/:/usr/sbin/',
require => [Package['xfsprogs'], Exec["parted-${title}"]],
unless => "xfs_admin -l ${dev}",
diff --git a/modules/swift_new/manifests/monitoring/graphite.pp
b/modules/swift_new/manifests/monitoring/graphite.pp
index c1dc997..334f9c5 100644
--- a/modules/swift_new/manifests/monitoring/graphite.pp
+++ b/modules/swift_new/manifests/monitoring/graphite.pp
@@ -11,9 +11,9 @@
nagios_critical => false
}
- monitoring::graphite_threshold {
"swift_$swift_cluster_dispersion_container":
- description => "swift $swift_cluster container availability",
- metric =>
"swift.$swift_cluster.dispersion.container.pct_found.value",
+ monitoring::graphite_threshold {
"swift_${swift_cluster_dispersion_container}":
+ description => "swift ${swift_cluster container availability}",
+ metric =>
"swift.${swift_cluster.dispersion.container.pct_found.value}",
from => '30min',
warning => 92,
critical => 88,
--
To view, visit https://gerrit.wikimedia.org/r/189898
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie9788d54ab8555eedcaa0d08413ac59676c07bc6
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits