27 lines
789 B
Puppet
27 lines
789 B
Puppet
#Class for SUNET-Drive-Cache
|
|
class sunetdrive::redis_cluster (
|
|
$location = undef,
|
|
)
|
|
{
|
|
$customer = sunetdrive::get_customer()
|
|
$redis_password = safe_hiera('redis_password')
|
|
package { 'redis-tools': ensure => latest, provider => 'apt' }
|
|
|
|
file { '/usr/local/bin/bootstrap_cluster':
|
|
ensure => present,
|
|
content => template('sunetdrive/redis_cluster/bootstrap_cluster.erb.sh'),
|
|
mode => '0700',
|
|
}
|
|
file { '/usr/local/bin/reset_cluster':
|
|
ensure => present,
|
|
content => template('sunetdrive/redis_cluster/reset_cluster.erb.sh'),
|
|
mode => '0700',
|
|
}
|
|
exec { 'set_permissions_directory':
|
|
command => 'chown -R 999:root /opt/redis/node-*'
|
|
}
|
|
exec { 'set_permissions_files':
|
|
command => 'chown -R 999:99 /opt/redis/node-*/*'
|
|
}
|
|
}
|