Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…memcached into gloppasglop-feature_sasl

Conflicts:
	manifests/init.pp
  • Loading branch information
saz committed Sep 22, 2014
2 parents 8c340fd + e368e33 commit b1bcddd
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,4 @@ If you find this module useful, send some bitcoins to 1Na3YFUmdxKxJLiuRXQYJU2kiN
* $install_dev = false (TRUE if 'libmemcached-dev' package should be installed)
* $processorcount = $::processorcount
* $service_restart = true (restart service after configuration changes, false to prevent restarts)
* $use_sasl = false (start memcached with SASL support)
1 change: 1 addition & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ require 'rubygems'
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'
PuppetLint.configuration.send('disable_80chars')
PuppetLint.configuration.relative = true
PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]

desc "Run puppet in noop mode and check for syntax errors."
Expand Down
3 changes: 2 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
$install_dev = false,
$processorcount = $::processorcount,
$service_restart = true,
$auto_removal = false
$auto_removal = false,
$use_sasl = false
) inherits memcached::params {

# validate type and convert string to boolean if necessary
Expand Down
9 changes: 7 additions & 2 deletions spec/classes/memcached_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@
:user => 'nobody',
:max_connections => '8192',
:install_dev => false,
:processorcount => 1
:processorcount => 1,
:use_sasl => false
}
end

Expand All @@ -76,7 +77,8 @@
:user => 'somebdy',
:max_connections => '8193',
:verbosity => 'vvv',
:processorcount => 3
:processorcount => 3,
:use_sasl => true
},
{
:package_ensure => 'present',
Expand Down Expand Up @@ -184,6 +186,9 @@
if(param_hash[:verbosity])
expected_lines.push("-vvv")
end
if(param_hash[:use_sasl])
expected_lines.push("-S")
end
(content.split("\n") & expected_lines).should =~ expected_lines
end
end
Expand Down
5 changes: 5 additions & 0 deletions templates/memcached.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ logfile <%= @logfile -%>
-k
<% end -%>

<% if @use_sasl -%>
# Start with SASL support
-S
<% end -%>

<% if @unix_socket -%>
# UNIX socket path to listen on
-s <%= @unix_socket %>
Expand Down

0 comments on commit b1bcddd

Please sign in to comment.