60ed2ee79c
Maintains full backward compatibility. Use swift_proxy_config ini provider to mange proxy-server.conf. Remove all erb templates. Move all template logic into proxy middleware classes. To purge proxy.conf of settings that are not specified set the new paramater "purge_config" to "true". Change-Id: I0a143cf812043ea0f9a008a6e5c60ec87f9a4e9a
38 lines
817 B
Puppet
38 lines
817 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']
|
|
) {
|
|
|
|
include ::swift::deps
|
|
|
|
# require the memcached class if its on the same machine
|
|
if !empty(grep(any2array($memcache_servers), '127.0.0.1')) {
|
|
Class['::memcached'] -> Class['::swift::proxy::cache']
|
|
}
|
|
|
|
swift_proxy_config {
|
|
'filter:cache/use': value => 'egg:swift#memcache';
|
|
'filter:cache/memcache_servers': value => join(any2array($memcache_servers), ',');
|
|
}
|
|
|
|
}
|