Skip to content

Commit

Permalink
Make config file owner dependency on redis package explicit
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
cdent committed Jan 9, 2015
1 parent 0e5bd1e commit d72af9a
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions manifests/sentinel.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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,
Expand Down

0 comments on commit d72af9a

Please sign in to comment.