Skip to content

Commit 9ed1ff0

Browse files
Make server and sentinel exec names unique echocat#111
This PR addresses Issue echocat#111 by updating the resource naming for both execs used to setup the systemd script for managing each service
1 parent 5c50ccc commit 9ed1ff0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

manifests/sentinel.pp

+2-2
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
# startup script
111111
if ($::osfamily == 'RedHat' and versioncmp($::operatingsystemmajrelease, '7') >=0 and $::operatingsystem != 'Amazon') {
112112
$service_file = "/usr/lib/systemd/system/redis-sentinel_${sentinel_name}.service"
113-
exec { "systemd_service_${sentinel_name}_preset":
113+
exec { "systemd_service_sentinel_${sentinel_name}_preset":
114114
command => "/bin/systemctl preset redis-sentinel_${sentinel_name}.service",
115115
notify => Service["redis-sentinel_${sentinel_name}"],
116116
refreshonly => true,
@@ -121,7 +121,7 @@
121121
mode => '0755',
122122
content => template('redis/systemd/sentinel.service.erb'),
123123
require => File[$conf_file],
124-
notify => Exec["systemd_service_${sentinel_name}_preset"],
124+
notify => Exec["systemd_service_sentinel_${sentinel_name}_preset"],
125125
}
126126
} else {
127127
$service_file = "/etc/init.d/redis-sentinel_${sentinel_name}"

manifests/server.pp

+2-2
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@
208208
}
209209

210210
if $has_systemd {
211-
exec { "systemd_service_${redis_name}_preset":
211+
exec { "systemd_service_server_${redis_name}_preset":
212212
command => "/bin/systemctl preset redis-server_${redis_name}.service",
213213
notify => Service["redis-server_${redis_name}"],
214214
refreshonly => true,
@@ -222,7 +222,7 @@
222222
File[$conf_file],
223223
File["${redis_dir}/redis_${redis_name}"]
224224
],
225-
notify => Exec["systemd_service_${redis_name}_preset"],
225+
notify => Exec["systemd_service_server_${redis_name}_preset"],
226226
}
227227
} else {
228228
$service_file = "/etc/init.d/redis-server_${redis_name}"

0 commit comments

Comments
 (0)