justicel / puppet-couchbase

Puppet couchbase module for auto-scaling of couchbase with puppet
9 stars 30 forks source link

Lint errors in config.pp and moxi.pp #23

Closed mleklund closed 9 years ago

mleklund commented 9 years ago

modules/couchbase/manifests/config.pp - WARNING: top-scope variable being used without an explicit namespace on line 56 modules/couchbase/manifests/config.pp - WARNING: top-scope variable being used without an explicit namespace on line 63 modules/couchbase/manifests/config.pp - WARNING: top-scope variable being used without an explicit namespace on line 96

I can make a pull request but was unsure of intention, or how you would like this fixed.

easiest fix is probably to add server_name to config.pp:

diff --git a/manifests/config.pp b/manifests/config.pp
index 920ded8..bf005d2 100644
--- a/manifests/config.pp
+++ b/manifests/config.pp
@@ -28,6 +28,7 @@ class couchbase::config (
   $user         = $::couchbase::user,
   $password     = $::couchbase::password,
   $server_group = 'default',
+  $server_name  = $::fqdn,
   $ensure       = $::couchbase::ensure,
   $autofailover = $::couchbase::params::autofailover,

Unrecognised escape sequence '\l' in file /Users/meklund/git/puppet/modules/couchbase/manifests/moxi.pp at line 54 Unrecognised escape sequence '\m' in file /Users/meklund/git/puppet/modules/couchbase/manifests/moxi.pp at line 54 Unrecognised escape sequence '\b' in file /Users/meklund/git/puppet/modules/couchbase/manifests/moxi.pp at line 56 Unrecognised escape sequence '\m' in file /Users/meklund/git/puppet/modules/couchbase/manifests/moxi.pp at line 56 Unrecognised escape sequence '\b' in file /Users/meklund/git/puppet/modules/couchbase/manifests/moxi.pp at line 63 Unrecognised escape sequence '\m' in file /Users/meklund/git/puppet/modules/couchbase/manifests/moxi.pp at line 63

Fix is to escape the windows slashes:

@@ -51,16 +51,16 @@ define couchbase::moxi (
   }
   elsif $::kernel == 'windows' {
     $moxi_root = 'c:\moxi'
-    $moxi_log  = "${moxi_root}\log\moxi_${port}.log"
+    $moxi_log  = "${moxi_root}\\log\\moxi_${port}.log"

-    file { "${$moxi_root}\bin\moxi-server_${port}.cmd":
+    file { "${$moxi_root}\\bin\\moxi-server_${port}.cmd":
       content => template("${module_name}/moxi-win_service.erb"),
       require => Package['moxi'],
       notify  => Service["Couchbase Moxi ${bucket} ${port}"],
     }

     exec {"register-moxi-service_${port}":
-      command => "nssm install \"Couchbase Moxi ${bucket} ${port}\" ${moxi_root}\bin\moxi-server_${port}.cmd",
+      command => "nssm install \"Couchbase Moxi ${bucket} ${port}\" ${moxi_root}\\bin\\moxi-server_${port}.cmd",
       unless  => "sc query \"Couchbase Moxi ${bucket} ${port}\"",
       path    => $::path,
       require => Package['nssm','moxi'],
justicel commented 9 years ago

Closing