[kolla-ansible][kolla] merge_configs module replacing colon to equal
sharath.madhava at gmail.com
Tue Jun 7 05:09:27 UTC 2022
In kolla-ansible, I am using the merge_configs module to merge service
configs files. I want to merge api-paste.ini config with my custom changes,
however while merging if a line consists of one colon, it is getting
replaced with equal sign. merge_configs splits the line by considering
colon as delimiter and treats two parts as key and value. Later which will
be substituted as key = value.
*/v2.1= oscomputeversion_v2 *
Below, colon will be 1 and equal will be -1,
*def _split_key_value(self, line): colon = line.find(':')
equal = line.find('=') if colon < 0 and equal < 0: return
self.error_invalid_assignment(line) if colon < 0 or (equal >= 0 and
equal < colon): key, value = line[:equal], line[equal + 1:]
else: key, value = line[:colon], line[colon + 1:] value
= value.strip() if value and value == value[-1] and
value.startswith(("\"", "'")): value = value[1:-1] return
I want to keep the config as it is and merge only my custom changes. Please
let me know how to achieve this or colon can be escaped somehow.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the openstack-discuss