diff --git a/Puppetfile b/Puppetfile index 1549bbab6..1c704b925 100644 --- a/Puppetfile +++ b/Puppetfile @@ -131,7 +131,7 @@ mod 'rabbitmq', :git => 'https://github.com/puppetlabs/puppetlabs-rabbitmq.git' mod 'redis', - :commit => 'f4ffa1b907281472c8572c7dbcee8d2f454f3e27', + :commit => '0e5bd1e5f0000fd2d1fa63936e2e013021dbadc4', :git => 'https://github.com/arioch/puppet-redis.git' mod 'rsync', diff --git a/redis/manifests/sentinel.pp b/redis/manifests/sentinel.pp index 258c0d20b..9c9cb2e1f 100644 --- a/redis/manifests/sentinel.pp +++ b/redis/manifests/sentinel.pp @@ -136,22 +136,24 @@ file { $config_file_orig: ensure => present, - content => template($conf_template); - - $config_file: owner => $service_user, group => $service_group, - mode => $config_file_mode; + mode => $config_file_mode, + content => template($conf_template); } exec { - "cp ${config_file_orig} ${config_file}": + "cp -p ${config_file_orig} ${config_file}": path => '/usr/bin:/bin', subscribe => File[$config_file_orig], notify => Service[$service_name], refreshonly => true; } + package { $::redis::params::package_name: + ensure => $::redis::params::package_ensure, + } + service { $service_name: ensure => $::redis::params::service_ensure, enable => $::redis::params::service_enable, diff --git a/redis/metadata.json b/redis/metadata.json index c647ae4a3..3fdff5322 100644 --- a/redis/metadata.json +++ b/redis/metadata.json @@ -1,6 +1,6 @@ { "name": "arioch-redis", - "version": "1.0.2", + "version": "1.0.3", "author": "Tom De Vylder", "summary": "Redis module", "license": "Apache License, Version 2.0", @@ -37,6 +37,13 @@ "7.5" ] }, + { + "operatingsystem": "Ubuntu", + "operatingsystemrelease": [ + "14.04", + "14.10" + ] + }, { "operatingsystem": "RedHat", "operatingsystemrelease": [ @@ -61,6 +68,8 @@ } ], "dependencies": [ - + { + "name": "puppetlabs/apt" + } ] } diff --git a/redis/spec/classes/redis_sentinel_spec.rb b/redis/spec/classes/redis_sentinel_spec.rb index 783178e70..dc389ae19 100644 --- a/redis/spec/classes/redis_sentinel_spec.rb +++ b/redis/spec/classes/redis_sentinel_spec.rb @@ -33,15 +33,12 @@ it { should contain_file('/etc/redis/redis-sentinel.conf.puppet').with( 'ensure' => 'present', + 'mode' => '0644', + 'owner' => 'redis', 'content' => $expected_noparams_content ) } - it { should contain_file('/etc/redis/redis-sentinel.conf').with( - 'mode' => '0644' - ) - } - it { should contain_service('redis-sentinel').with( 'ensure' => 'running', 'enable' => 'true',