Karbor providers managed from deployment node
Karbor provider configs can be injected/managed from 'node_custom_config' var openstack-infra.conf will still be created if no custom providers present Closes-Bug #1814464 Change-Id: I500daae80596cb7b7342fd8d4affa8f901b24a13
This commit is contained in:
parent
da98030909
commit
e65f4ec7cd
@ -43,6 +43,7 @@
|
||||
- service.enabled | bool
|
||||
- config_json.changed | bool
|
||||
or karbor_conf.changed | bool
|
||||
or providers_conf.changed
|
||||
or openstack_infra_conf.changed | bool
|
||||
or karbor_protection_container.changed | bool
|
||||
|
||||
|
@ -51,12 +51,32 @@
|
||||
- Restart karbor-protection container
|
||||
- Restart karbor-operationengine container
|
||||
|
||||
- name: Copying over provider configs
|
||||
vars:
|
||||
service_name: 'karbor-protection'
|
||||
service: "{{ karbor_services[service_name] }}"
|
||||
copy:
|
||||
src: "{{ item }}"
|
||||
dest: "{{ node_config_directory }}/{{ service_name }}/providers.d/"
|
||||
mode: "0660"
|
||||
become: true
|
||||
with_fileglob:
|
||||
- "{{ node_custom_config }}/karbor/{{ service_name }}/providers.d/*"
|
||||
register: providers_conf
|
||||
when:
|
||||
- inventory_hostname in groups[service.group]
|
||||
- service.enabled | bool
|
||||
notify:
|
||||
- Restart karbor-protection container
|
||||
|
||||
- name: Copying over openstack-infra.conf
|
||||
vars:
|
||||
service_name: 'karbor-protection'
|
||||
service: "{{ karbor_services[service_name] }}"
|
||||
template:
|
||||
src: "providers.d/openstack-infra.conf.j2"
|
||||
merge_configs:
|
||||
sources:
|
||||
- "{{ role_path }}/templates/providers.d/openstack-infra.conf.j2"
|
||||
- "{{ node_custom_config }}/karbor/{{ service_name }}/providers.d/openstack-infra.conf"
|
||||
dest: "{{ node_config_directory }}/{{ service_name }}/providers.d/openstack-infra.conf"
|
||||
mode: "0660"
|
||||
become: true
|
||||
|
@ -8,8 +8,8 @@
|
||||
"perm": "0600"
|
||||
},
|
||||
{
|
||||
"source": "{{ container_config_directory }}/providers.d/openstack-infra.conf",
|
||||
"dest": "/etc/karbor/providers.d/openstack-infra.conf",
|
||||
"source": "{{ container_config_directory }}/providers.d/*",
|
||||
"dest": "/etc/karbor/providers.d/",
|
||||
"owner": "karbor",
|
||||
"perm": "0600"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user