diff --git a/ansible/roles/karbor/handlers/main.yml b/ansible/roles/karbor/handlers/main.yml index a179280c39..32dbcee361 100644 --- a/ansible/roles/karbor/handlers/main.yml +++ b/ansible/roles/karbor/handlers/main.yml @@ -18,7 +18,6 @@ - service.enabled | bool - config_json.changed | bool or karbor_conf.changed | bool - or openstack_infra_conf.changed | bool or karbor_api_container.changed | bool - name: Restart karbor-protection container @@ -62,5 +61,4 @@ - service.enabled | bool - config_json.changed | bool or karbor_conf.changed | bool - or openstack_infra_conf.changed | bool or karbor_operationengine_container.changed | bool diff --git a/ansible/roles/karbor/tasks/config.yml b/ansible/roles/karbor/tasks/config.yml index 5ff24ebb93..471e414a77 100644 --- a/ansible/roles/karbor/tasks/config.yml +++ b/ansible/roles/karbor/tasks/config.yml @@ -48,19 +48,17 @@ - name: Copying over openstack-infra.conf vars: - service: "{{ item.key }}" + service_name: 'karbor-protection' + service: "{{ karbor_services[service_name] }}" template: src: "providers.d/openstack-infra.conf.j2" - dest: "{{ node_config_directory }}/{{ item.key }}/providers.d/openstack-infra.conf" + dest: "{{ node_config_directory }}/{{ service_name }}/providers.d/openstack-infra.conf" register: openstack_infra_conf when: - - inventory_hostname in groups[item.value.group] - - item.value.enabled | bool - with_dict: "{{ karbor_services }}" + - inventory_hostname in groups[service.group] + - service.enabled | bool notify: - - Restart karbor-api container - Restart karbor-protection container - - Restart karbor-operationengine container - name: Check karbor containers kolla_docker: