From d72af9ab3c2911b6dc18c5cc12e700630ebdcfb2 Mon Sep 17 00:00:00 2001 From: Chris Dent Date: Fri, 9 Jan 2015 12:50:36 +0000 Subject: [PATCH] Make config file owner dependency on redis package explicit Without this it's possible that on a clean machine where only sentinel is being installed the install will fail because the 'redis' user (who owns the *.puppet config file) will not yet exist. By ensuring that the redis package is installed explicitly first the user will be there. The previous pull request related to this problem added the package dependency but did not make the ordering explicity. --- manifests/sentinel.pp | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/manifests/sentinel.pp b/manifests/sentinel.pp index 9c9cb2e1f..618162dba 100644 --- a/manifests/sentinel.pp +++ b/manifests/sentinel.pp @@ -133,13 +133,19 @@ $working_dir = $::redis::params::sentinel_working_dir, ) inherits redis::params { + + package { $::redis::params::package_name: + ensure => $::redis::params::package_ensure, + } + file { $config_file_orig: ensure => present, - owner => $service_user, - group => $service_group, - mode => $config_file_mode, - content => template($conf_template); + owner => $service_user, + group => $service_group, + mode => $config_file_mode, + content => template($conf_template), + require => Package[$::redis::params::package_name]; } exec { @@ -150,10 +156,6 @@ 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,