Andrew Bogott has submitted this change and it was merged.

Change subject: lint: fix 'variable not enclosed' warnings
......................................................................


lint: fix 'variable not enclosed' warnings

We globally disabled this puppet-lint check in puppet-lint.rc.

The comment right above it is "Variables should be enclosed in {}".

Nowadays there are actually just about 68 of these to fix in the
entire repository and if we do that we can re-enable this check.

Change-Id: I1526f6387254919ad492cdb969b0c1c748ba4d4f
---
M modules/apt/manifests/init.pp
M modules/diamond/manifests/collector/servicestats.pp
M modules/interface/manifests/add_ip6_mapped.pp
M modules/ldap/manifests/client.pp
M modules/openstack/manifests/keystone/service.pp
M modules/restbase/manifests/deploy.pp
M modules/rsyslog/manifests/receiver.pp
M modules/sslcert/manifests/chainedcert.pp
M modules/statsite/manifests/instance.pp
M modules/tlsproxy/manifests/ocsp_stapler.pp
M modules/tlsproxy/manifests/ocsp_updater.pp
M modules/toollabs/manifests/proxy.pp
M modules/varnish/manifests/setup_filesystem.pp
13 files changed, 21 insertions(+), 21 deletions(-)

Approvals:
  Andrew Bogott: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/apt/manifests/init.pp b/modules/apt/manifests/init.pp
index 8802817..e6cea05 100644
--- a/modules/apt/manifests/init.pp
+++ b/modules/apt/manifests/init.pp
@@ -96,7 +96,7 @@
             value    => $http_proxy,
         }
     } else {
-        fail("Unknown operating system '$::operatingsystem'.")
+        fail("Unknown operating system '${::operatingsystem}'.")
     }
 
     apt::repository { 'wikimedia':
diff --git a/modules/diamond/manifests/collector/servicestats.pp 
b/modules/diamond/manifests/collector/servicestats.pp
index d078200..89914d5 100644
--- a/modules/diamond/manifests/collector/servicestats.pp
+++ b/modules/diamond/manifests/collector/servicestats.pp
@@ -21,8 +21,8 @@
 
     include ::diamond::collector::servicestats_lib
 
-    file { "/etc/diamond/servicestats.d/$title.conf":
-      content  => 
"[systemd]\nname=$systemd_name\n[upstart]\nname=$upstart_name\n",
+    file { "/etc/diamond/servicestats.d/${title}.conf":
+      content  => 
"[systemd]\nname=${systemd_name}\n[upstart]\nname=${upstart_name}\n",
       owner    => 'root',
       group    => 'root',
       mode     => '0444',
diff --git a/modules/interface/manifests/add_ip6_mapped.pp 
b/modules/interface/manifests/add_ip6_mapped.pp
index 1575c8a..c2ca2c3 100644
--- a/modules/interface/manifests/add_ip6_mapped.pp
+++ b/modules/interface/manifests/add_ip6_mapped.pp
@@ -51,9 +51,9 @@
         # but any previous macaddr-based address will be flushed.
 
         if os_version('debian >= jessie || ubuntu >= trusty') {
-            $v6_token_cmd = "/sbin/ip token set $v6_mapped_lower64 dev ${intf}"
+            $v6_token_cmd = "/sbin/ip token set ${v6_mapped_lower64} dev 
${intf}"
             $v6_flush_dyn_cmd = "/sbin/ip -6 addr flush dev ${intf} dynamic"
-            $v6_token_check_cmd = "/sbin/ip token get dev $intf | grep -qw 
$v6_mapped_lower64"
+            $v6_token_check_cmd = "/sbin/ip token get dev ${intf} | grep -qw 
${v6_mapped_lower64}"
             $v6_token_preup_cmd = "set iface[. = '${intf}']/pre-up 
'${v6_token_cmd}'"
 
             augeas { "${intf}_v6_token":
@@ -62,7 +62,7 @@
             }
 
             exec { "${intf}_v6_token":
-                command => "$v6_token_cmd && $v6_flush_dyn_cmd",
+                command => "${v6_token_cmd} && ${v6_flush_dyn_cmd}",
                 unless  => $v6_token_check_cmd,
             }
         }
diff --git a/modules/ldap/manifests/client.pp b/modules/ldap/manifests/client.pp
index 6fc8380..684cfd2 100644
--- a/modules/ldap/manifests/client.pp
+++ b/modules/ldap/manifests/client.pp
@@ -92,7 +92,7 @@
     $client_readable_config = {
         'servers'  => $ldapconfig['servernames'],
         'basedn'   => $ldapconfig['basedn'],
-        'user' => "cn=proxyagent,ou=profile,$ldap_pw",
+        'user' => "cn=proxyagent,ou=profile,${ldap_pw}",
         'password' => $ldapconfig['proxypass'],
     }
 
diff --git a/modules/openstack/manifests/keystone/service.pp 
b/modules/openstack/manifests/keystone/service.pp
index 54c2570..db12c79 100644
--- a/modules/openstack/manifests/keystone/service.pp
+++ b/modules/openstack/manifests/keystone/service.pp
@@ -39,7 +39,7 @@
                 user    => 'root',
                 minute  => 20,
                 ensure  => present,
-                command => "/usr/bin/mysql $keystone_db_name 
-h${keystone_db_host} -u${keystone_db_user} -p${keystone_db_pass} -e 'DELETE 
FROM token WHERE NOW() - INTERVAL 2 day > expires LIMIT 10000;'",
+                command => "/usr/bin/mysql ${keystone_db_name} 
-h${keystone_db_host} -u${keystone_db_user} -p${keystone_db_pass} -e 'DELETE 
FROM token WHERE NOW() - INTERVAL 2 day > expires LIMIT 10000;'",
         }
 
         nrpe::monitor_service { 'check_keystone_process':
diff --git a/modules/restbase/manifests/deploy.pp 
b/modules/restbase/manifests/deploy.pp
index 5bd6748..f5d7d89 100644
--- a/modules/restbase/manifests/deploy.pp
+++ b/modules/restbase/manifests/deploy.pp
@@ -47,7 +47,7 @@
 
     sudo::user { $user:
         privileges => [
-            "ALL = ($user) NOPASSWD: ALL",
+            "ALL = (${user}) NOPASSWD: ALL",
             'ALL = (root) NOPASSWD: /usr/sbin/service restbase restart',
         ]
     }
diff --git a/modules/rsyslog/manifests/receiver.pp 
b/modules/rsyslog/manifests/receiver.pp
index 6bc9362..2453098 100644
--- a/modules/rsyslog/manifests/receiver.pp
+++ b/modules/rsyslog/manifests/receiver.pp
@@ -26,7 +26,7 @@
 ) {
 
     if ($log_directory == $archive_directory) {
-        fail("rsyslog log and archive are the same: $log_directory")
+        fail("rsyslog log and archive are the same: ${log_directory}")
     }
 
     rsyslog::conf { 'receiver':
diff --git a/modules/sslcert/manifests/chainedcert.pp 
b/modules/sslcert/manifests/chainedcert.pp
index 736a366..5bb8d71 100644
--- a/modules/sslcert/manifests/chainedcert.pp
+++ b/modules/sslcert/manifests/chainedcert.pp
@@ -46,15 +46,15 @@
         exec { "x509-bundle ${title}-chained":
             path    => 'bin:/usr/bin',
             cwd     => '/etc/ssl/localcerts',
-            command => "$script --skip-root -c $inpath -o $chainedfile",
-            unless  => "[ $chainedfile -nt $inpath -a $chainedfile -nt $script 
]",
+            command => "${script} --skip-root -c ${inpath} -o ${chainedfile}",
+            unless  => "[ ${chainedfile} -nt ${inpath} -a ${chainedfile} -nt 
${script} ]",
             require => [ File[$inpath], File[$script] ],
         }
         exec { "x509-bundle ${title}-chain":
             path    => 'bin:/usr/bin',
             cwd     => '/etc/ssl/localcerts',
-            command => "$script --skip-root --skip-first -c $inpath -o 
$chainfile",
-            unless  => "[ $chainfile -nt $inpath -a $chainfile -nt $script ]",
+            command => "${script} --skip-root --skip-first -c ${inpath} -o 
${chainfile}",
+            unless  => "[ ${chainfile} -nt ${inpath} -a ${chainfile} -nt 
${script} ]",
             require => [ File[$inpath], File[$script] ],
         }
 
diff --git a/modules/statsite/manifests/instance.pp 
b/modules/statsite/manifests/instance.pp
index 7dff391..7727b17 100644
--- a/modules/statsite/manifests/instance.pp
+++ b/modules/statsite/manifests/instance.pp
@@ -26,10 +26,10 @@
     $input_counter     = "statsd.${::hostname}.received",
     $extended_counters = hiera('statsite::instance::extended_counters', 1),
 ) {
-    $stream_cmd = "python /usr/lib/statsite/sinks/graphite.py $graphite_host 
$graphite_port \"\""
+    $stream_cmd = "python /usr/lib/statsite/sinks/graphite.py ${graphite_host} 
${graphite_port} \"\""
 
     if os_version('ubuntu >= precise') {
-        file { "/etc/statsite/$port.ini":
+        file { "/etc/statsite/${port}.ini":
             content => template('statsite/statsite.ini.erb'),
             require => Package['statsite'],
             notify  => Service['statsite'],
diff --git a/modules/tlsproxy/manifests/ocsp_stapler.pp 
b/modules/tlsproxy/manifests/ocsp_stapler.pp
index ee382d0..43fa8fc 100644
--- a/modules/tlsproxy/manifests/ocsp_stapler.pp
+++ b/modules/tlsproxy/manifests/ocsp_stapler.pp
@@ -5,14 +5,14 @@
     $output    = "/var/cache/ocsp/${name}.ocsp"
     $cpfx      = '-c /etc/ssl/localcerts/'
     $csfx      = '.crt'
-    $ocsp_args = join([$cpfx, join($certs, "$csfx $cpfx"), "$csfx -o 
$output"], '')
+    $ocsp_args = join([$cpfx, join($certs, "${csfx} ${cpfx}"), "${csfx} -o 
${output}"], '')
     # sorry for the horrible join, we need map() :P
     # for $name = 'x', $certs = ['C1', 'C2'], $ocsp_args should look like:
     # -c /etc/ssl/localcerts/C1.crt -c /etc/ssl/localcerts/C2.crt -o 
/var/cache/ocsp/x.ocsp
 
     # Initial creation on puppet run (ocsp_updater takes care after)
     exec { "${title}-create-ocsp":
-        command => "/usr/local/sbin/update-ocsp -p $proxy $ocsp_args",
+        command => "/usr/local/sbin/update-ocsp -p ${proxy} ${ocsp_args}",
         creates => $output,
         before  => Service['nginx']
     }
diff --git a/modules/tlsproxy/manifests/ocsp_updater.pp 
b/modules/tlsproxy/manifests/ocsp_updater.pp
index 6837654..34c69b9 100644
--- a/modules/tlsproxy/manifests/ocsp_updater.pp
+++ b/modules/tlsproxy/manifests/ocsp_updater.pp
@@ -55,7 +55,7 @@
     $check_args = '-c 29100 -w 14700 -d /var/cache/ocsp -g "*.ocsp"'
     nrpe::monitor_service { 'ocsp-freshness':
         description  => 'Freshness of OCSP Stapling files',
-        nrpe_command => "/usr/lib/nagios/plugins/check-fresh-files-in-dir.py 
$check_args",
+        nrpe_command => "/usr/lib/nagios/plugins/check-fresh-files-in-dir.py 
${check_args}",
         require      => 
File['/usr/lib/nagios/plugins/check-fresh-files-in-dir.py'],
     }
 }
diff --git a/modules/toollabs/manifests/proxy.pp 
b/modules/toollabs/manifests/proxy.pp
index 04d2a82..99840fe 100644
--- a/modules/toollabs/manifests/proxy.pp
+++ b/modules/toollabs/manifests/proxy.pp
@@ -49,7 +49,7 @@
     ferm::service { 'redis-replication':
         proto  => 'tcp',
         port   => '6379',
-        srange => "@resolve(($proxy_nodes))",
+        srange => "@resolve((${proxy_nodes}))",
     }
 
     file { '/usr/local/sbin/proxylistener':
diff --git a/modules/varnish/manifests/setup_filesystem.pp 
b/modules/varnish/manifests/setup_filesystem.pp
index 31b53ab..9bd9cf9 100644
--- a/modules/varnish/manifests/setup_filesystem.pp
+++ b/modules/varnish/manifests/setup_filesystem.pp
@@ -14,7 +14,7 @@
         $custom_mount_opts = ',nodiratime,nobarrier,logbufs=8'
     }
 
-    $mount_options = "noatime$custom_mount_opts"
+    $mount_options = "noatime${custom_mount_opts}"
 
     if $::realm == 'labs' and $::site == 'eqiad' {
       include labs_lvm

-- 
To view, visit https://gerrit.wikimedia.org/r/242055
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I1526f6387254919ad492cdb969b0c1c748ba4d4f
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn <[email protected]>
Gerrit-Reviewer: Andrew Bogott <[email protected]>
Gerrit-Reviewer: BBlack <[email protected]>
Gerrit-Reviewer: Hashar <[email protected]>
Gerrit-Reviewer: Merlijn van Deen <[email protected]>
Gerrit-Reviewer: Yuvipanda <[email protected]>
Gerrit-Reviewer: coren <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to