ef9f9a4194
Evaluation Error: Left match operand must result in a String value. Got an Array. at .../modules/swift/manifests/proxy/cache.pp:26:6 Please note that Puppet syntax, while it defines a regex type, does NOT permit regex type arguments to be passed to functions (as literals or assigned to variables). Change-Id: Ia230720e2cafb5b03404cea1ba54dd3b0ced6af3 Closes-Bug: #1449272 Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
37 lines
765 B
Puppet
37 lines
765 B
Puppet
#
|
|
# Configures the swift proxy memcache server
|
|
#
|
|
# [*memcache_servers*] A list of the memcache servers to be used. Entries
|
|
# should be in the form host:port.
|
|
#
|
|
# == Dependencies
|
|
#
|
|
# Class['memcached']
|
|
#
|
|
# == Examples
|
|
#
|
|
# == Authors
|
|
#
|
|
# Dan Bode dan@puppetlabs.com
|
|
#
|
|
# == Copyright
|
|
#
|
|
# Copyright 2011 Puppetlabs Inc, unless otherwise noted.
|
|
#
|
|
class swift::proxy::cache(
|
|
$memcache_servers = ['127.0.0.1:11211']
|
|
) {
|
|
|
|
# require the memcached class if its on the same machine
|
|
if grep(any2array($memcache_servers), '^127\.0\.0\.1') {
|
|
Class['memcached'] -> Class['swift::proxy::cache']
|
|
}
|
|
|
|
concat::fragment { 'swift_cache':
|
|
target => '/etc/swift/proxy-server.conf',
|
|
content => template('swift/proxy/cache.conf.erb'),
|
|
order => '23',
|
|
}
|
|
|
|
}
|