File tree 1 file changed +2
-2
lines changed
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 311
311
if $running == false {
312
312
exec { "stop ${title} with docker" :
313
313
command => " ${docker_command} stop --time=${stop_wait_time} ${sanitised_title} " ,
314
- unless => " ${docker_command} inspect ${sanitised_title} -f \" {{ .State.Running }}\" | grep true " ,
314
+ unless => " ${docker_command} inspect ${sanitised_title} -f \" {{ if ( .State.Running) }} {{ nil }}{{ end }} \" " ,
315
315
environment => $exec_environment ,
316
316
path => $exec_path ,
317
317
provider => $exec_provider ,
320
320
} else {
321
321
exec { "start ${title} with docker" :
322
322
command => " ${docker_command} start ${sanitised_title} " ,
323
- onlyif => " ${docker_command} inspect ${sanitised_title} -f \" {{ .State.Running }}\" | grep false " ,
323
+ onlyif => " ${docker_command} inspect ${sanitised_title} -f \" {{ if ( .State.Running) }} {{ nil }}{{ end }} \" " ,
324
324
environment => $exec_environment ,
325
325
path => $exec_path ,
326
326
provider => $exec_provider ,
You can’t perform that action at this time.
0 commit comments