aboutsummaryrefslogtreecommitdiff
path: root/ansible/roles/kolla_toolbox/handlers/main.yml
blob: 8acaece9367f3aaa3d79d75ceb833a296cdff78f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
---
- name: Restart kolla-toolbox container
  vars:
    service_name: "kolla-toolbox"
    service: "{{ kolla_toolbox_services[service_name] }}"
  become: true
  kolla_container:
    action: "recreate_or_restart_container"
    common_options: "{{ docker_common_options }}"
    name: "{{ service.container_name }}"
    image: "{{ service.image }}"
    privileged: "{{ service.privileged | default(False) }}"
    volumes: "{{ service.volumes }}"
    environment: "{{ service.environment }}"
    dimensions: "{{ service.dimensions }}"
  notify:
    - Initializing toolbox container using normal user

- name: Initializing toolbox container using normal user
  vars:
    service_name: "kolla-toolbox"
    service: "{{ kolla_toolbox_services[service_name] }}"
  become: true
  ansible.builtin.command: "{{ kolla_container_engine }} exec -t {{ service['container_name'] }} ansible --version"
  changed_when: false
  register: result
  until: result.rc == 0
  retries: 5
  delay: 5