postgres-make-base-backups: re-order logic for consistency
[mirror/dsa-puppet.git] / modules / salsa / manifests / redis.pp
1 #
2 class salsa::redis inherits salsa {
3         ensure_packages ( "redis-server", { ensure => 'installed' })
4
5         service { 'redis-server':
6                 ensure  => 'running',
7                 enable  => true,
8                 require => Package['redis-server'],
9         }
10
11         file { "/etc/redis/redis.conf":
12                 mode => "640",
13                 owner => redis,
14                 group => redis,
15                 source => "puppet:///modules/salsa/redis.conf",
16                 notify  => Service['redis-server'],
17                 require => Package['redis-server'],
18         } 
19
20         file { "/var/run/redis":
21                 ensure => "directory",
22                 mode => "750",
23                 owner => redis,
24                 group => redis,
25                 notify  => Service['redis-server'],
26         }
27
28         exec { 'add-git-user-to-redis':
29                 command => 'adduser git redis',
30                 onlyif  => "getent group redis > /dev/null && ! getent group redis | grep '\\<git\\>' > /dev/null"
31         }
32 }