Redis: replace hiera CLI

The hiera CLI is deprecated[1] in favor of the new ``puppet lookup``
command and doesn't work with the latest hieradata v5. However
the ``puppet lookup`` command requires gathering fact data and should
not be used outside of configuration tasks.
 [1] https://puppet.com/docs/puppet/7/hiera_automatic.html

This replaces the hiera CLI used to detect the listen address of
the stunnel service for redis, by parsing the stunnel.conf.

Change-Id: Ib1ed9bb4ba1e2d40ed415ddaa43a8528a3d058a9
This commit is contained in:
Takashi Kajinami 2022-09-05 13:27:49 +09:00
parent 5775d1274e
commit 3e37e6647b

View File

@ -214,11 +214,7 @@ outputs:
command:
# Note: kolla doesn't process string arguments as expected,
# so use a bash idiom to achieve the same result
str_replace:
template:
bash -c $* -- eval /wait-port-and-run.sh $(hiera fqdn_$NETWORK) 6379 stunnel /etc/stunnel/stunnel.conf
params:
$NETWORK: {get_param: [ServiceNetMap, RedisNetwork]}
bash -c $* -- eval /wait-port-and-run.sh $(crudini --get /etc/stunnel/stunnel.conf redis accept | rev | cut -d : -f 1- | rev) 6379 stunnel /etc/stunnel/stunnel.conf
config_files:
- source: "/var/lib/kolla/config_files/src/*"
dest: "/"