From 0b132775eb4b8c373837772974b03518e3e09f61 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Thu, 29 Apr 2021 09:09:32 +0100 Subject: [PATCH] Fix neutron-ovn-metadata-agent with policy.yaml The config.json template for neutron-ovn-metadata-agent uses a hard-coded policy file name of policy.json. This prevents use of a policy.yaml file with this service. This patch fixes this. TrivialFix Change-Id: Ib96d68f1dc60a0cbb5b79302c1face9c2272946a --- .../templates/neutron-ovn-metadata-agent.json.j2 | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/ansible/roles/neutron/templates/neutron-ovn-metadata-agent.json.j2 b/ansible/roles/neutron/templates/neutron-ovn-metadata-agent.json.j2 index f88e66494b..6c3850b5c5 100644 --- a/ansible/roles/neutron/templates/neutron-ovn-metadata-agent.json.j2 +++ b/ansible/roles/neutron/templates/neutron-ovn-metadata-agent.json.j2 @@ -12,14 +12,13 @@ "dest": "/etc/neutron/neutron_ovn_metadata_agent.ini", "owner": "neutron", "perm": "0600" - }, - { - "source": "{{ container_config_directory }}/policy.json", - "dest": "/etc/neutron/policy.json", - "owner": "neutron", - "perm": "0600", - "optional": true } + {% if neutron_policy_file is defined %},{ + "source": "{{ container_config_directory }}/{{ neutron_policy_file }}", + "dest": "/etc/neutron/{{ neutron_policy_file }}", + "owner": "neutron", + "perm": "0600" + }{% endif %} ], "permissions": [ {