Allow to override placement policy files
We implement `placement_policy_overrides` variable in order to allow management of placement policy files when needed. Change-Id: If219ac80ceed2bf455a7de83b848c9d0a66371a4
This commit is contained in:
parent
585aa86dbb
commit
0dfcbc27ec
@ -118,3 +118,4 @@ placement_services:
|
||||
placement_api_uwsgi_ini_overrides: {}
|
||||
placement_api_init_overrides: {}
|
||||
placement_placement_conf_overrides: {}
|
||||
placement_policy_overrides: {}
|
||||
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
features:
|
||||
- |
|
||||
Added variable ``placement_policy_overrides`` that aims to allow deploying
|
||||
policy.yaml file with provided overrides for Placement service.
|
@ -30,3 +30,22 @@
|
||||
notify:
|
||||
- Restart placement services
|
||||
- Restart uwsgi services
|
||||
|
||||
- name: Implement policy.yaml if there are overrides configured
|
||||
config_template:
|
||||
content: "{{ placement_policy_overrides }}"
|
||||
dest: "/etc/placement/policy.yaml"
|
||||
config_type: yaml
|
||||
when:
|
||||
- placement_policy_overrides | length > 0
|
||||
tags:
|
||||
- placement-policy-override
|
||||
|
||||
- name: Remove legacy policy.yaml file
|
||||
file:
|
||||
path: "/etc/placement/policy.yaml"
|
||||
state: absent
|
||||
when:
|
||||
- placement_policy_overrides | length == 0
|
||||
tags:
|
||||
- placement-policy-override
|
||||
|
Loading…
Reference in New Issue
Block a user