Merge "Karbor providers managed from deployment node"

This commit is contained in:
Zuul 2019-02-18 09:07:58 +00:00 committed by Gerrit Code Review
commit 5c68239f1c
3 changed files with 25 additions and 4 deletions

View File

@ -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

View File

@ -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

View File

@ -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"
}