Allow to override blazar policy files
We implement `blazar_policy_overrides` variable in order to allow management of balazar policy files when needed. Change-Id: I581a9c9659d3d023eb40cf2c6dfc2d01fa0a7464
This commit is contained in:
parent
d3b9030c97
commit
fcc6a1b6ea
|
@ -139,6 +139,7 @@ blazar_program_name: blazar-server
|
|||
|
||||
## Tunable overrides
|
||||
blazar_blazar_api_paste_ini_overrides: {}
|
||||
blazar_policy_overrides: {}
|
||||
blazar_blazar_conf_overrides: {}
|
||||
blazar_api_init_config_overrides: {}
|
||||
blazar_manager_init_config_overrides: {}
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
features:
|
||||
- |
|
||||
Added variable ``blazar_policy_overrides`` that aims to allow deploying
|
||||
policy.yaml file with provided overrides for Blazar service.
|
|
@ -16,17 +16,23 @@
|
|||
|
||||
- name: Deploy configuration files
|
||||
config_template:
|
||||
src: "{{ item.src }}"
|
||||
src: "{{ item.src | default(omit) }}"
|
||||
dest: "{{ item.dest }}"
|
||||
owner: "root"
|
||||
group: "{{ blazar_system_group_name }}"
|
||||
mode: "0640"
|
||||
config_overrides: "{{ item.config_overrides }}"
|
||||
config_overrides: "{{ item.config_overrides | default(omit) }}"
|
||||
content: "{{ item.content | default(omit) }}"
|
||||
config_type: "{{ item.config_type }}"
|
||||
when: item.condition | default(True)
|
||||
with_items:
|
||||
- src: "blazar.conf.j2"
|
||||
dest: "{{ blazar_etc_dir }}/blazar.conf"
|
||||
config_overrides: "{{ blazar_blazar_conf_overrides }}"
|
||||
config_type: "ini"
|
||||
- dest: "{{ blazar_etc_dir }}/policy.yaml"
|
||||
content: "{{ blazar_policy_overrides }}"
|
||||
config_type: "yaml"
|
||||
condition: "{{ (blazar_policy_overrides) }}"
|
||||
notify:
|
||||
- Restart blazar services
|
||||
- Restart blazar services
|
||||
|
|
Loading…
Reference in New Issue