This unlocks using the new I/O Threads feature of Redis 6.X.
In order to support it the redis template file now accepts a parameter
allowing an operator to enable it and pick how many threads.
By default sets threads to 1, which disables the feature and acts like
redis 5.
set -e
# version check: https://redis.io/
-REDIS_VERSION=5.0.9
-REDIS_HASH="53d0ae164cd33536c3d4b720ae9a128ea6166ebf04ff1add3b85f1242090cb85"
+REDIS_VERSION=6.0.9
+REDIS_HASH="dc2bdcf81c620e9f09cfd12e85d3bc631c897b2db7a55218fd8a65eaa37f86dd"
cd /tmp
# Prepare Redis source.
+params:
+ redis_io_threads: "1"
+
run:
- file:
path: /etc/service/redis/run
from: /^protected-mode yes/
to: "protected-mode no"
+ - replace:
+ filename: "/etc/redis/redis.conf"
+ from: "# io-threads 4"
+ to: "io-threads $redis_io_threads"
+
- exec:
cmd: echo redis installed
hook: redis