kolla-ansible/ansible/roles/horizon
Martin Chlumsky 9d0ccad15a Fix empty match while setting supported_policy_files
When supported_policy_files gets set under python 3.7 [1], the regex '(.*)'
matches twice, once for the policy file name and once more for the empty string
that follows the policy file name. This is new behavior under python
3.7. [2]

This leads to the replacement string being written out twice resulting
in something like this: "nova_policy.yamlnova_".

This patch changes the regex to '(.+)' ensuring there is no match success
against the empty string.

[1]:
- set_fact:
    supported_policy_files: "{{ supported_policy_format_list | map('regex_replace', '(.*)', '{{ project_name }}_\\1') | list }}"

[2]: https://docs.python.org/3/library/re.html#re.sub

Change-Id: Ie5278832e293364c66d53ddb07dff9c5409f0cc6
Closes-Bug: 1851249
2019-11-04 13:17:39 -05:00
..
defaults Implement IPv6 support in the control plane 2019-10-16 10:24:35 +02:00
handlers Simplify handler conditionals 2019-06-27 15:57:19 +00:00
meta Add ansible support for Horizon 2015-08-24 18:19:34 +00:00
tasks Fix empty match while setting supported_policy_files 2019-11-04 13:17:39 -05:00
templates Implement IPv6 support in the control plane 2019-10-16 10:24:35 +02:00