8721ca35d8
kolla-toolbox container name variable is fixed in some places, but in the defaults directory, kolla-toolbox container_name variable is variable. If the kolla-toolbox container_name variable is changed during deployment, it will not be assigned to kolla-toolbox, but a fixed 'kolla-toolbox' name. Change-Id: I9579017761ff47477dba597282be9ae6fab4242a
57 lines
1.7 KiB
YAML
57 lines
1.7 KiB
YAML
---
|
|
- name: Restart fluentd container
|
|
vars:
|
|
service_name: "fluentd"
|
|
service: "{{ common_services[service_name] }}"
|
|
become: true
|
|
kolla_docker:
|
|
action: "recreate_or_restart_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ service.container_name }}"
|
|
image: "{{ service.image }}"
|
|
volumes: "{{ service.volumes }}"
|
|
environment: "{{ service.environment }}"
|
|
dimensions: "{{ service.dimensions }}"
|
|
when:
|
|
- kolla_action != "config"
|
|
|
|
- name: Restart kolla-toolbox container
|
|
vars:
|
|
service_name: "kolla-toolbox"
|
|
service: "{{ common_services[service_name] }}"
|
|
become: true
|
|
kolla_docker:
|
|
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 }}"
|
|
when:
|
|
- kolla_action != "config"
|
|
notify:
|
|
- Initializing toolbox container using normal user
|
|
|
|
- name: Initializing toolbox container using normal user
|
|
become: true
|
|
command: docker exec -t "{{ common_services['kolla-toolbox']['container_name'] }}" ansible --version
|
|
changed_when: false
|
|
|
|
- name: Restart cron container
|
|
vars:
|
|
service_name: "cron"
|
|
service: "{{ common_services[service_name] }}"
|
|
become: true
|
|
kolla_docker:
|
|
action: "recreate_or_restart_container"
|
|
common_options: "{{ docker_common_options }}"
|
|
name: "{{ service.container_name }}"
|
|
image: "{{ service.image }}"
|
|
volumes: "{{ service.volumes }}"
|
|
environment: "{{ service.environment }}"
|
|
dimensions: "{{ service.dimensions }}"
|
|
when:
|
|
- kolla_action != "config"
|