kolla-ansible/ansible/roles/hacluster/tasks/check-containers.yml
Gaëtan Trellu 9f578c85e0 Add HAcluster Ansible role
Adds HAcluster Ansible role. This role contains High Availability
clustering solution composed of Corosync, Pacemaker and Pacemaker Remote.

HAcluster is added as a helper role for Masakari which requires it for
its host monitoring, allowing to provide HA to instances on a failed
compute host.

Kolla hacluster images merged in [1].

[1] https://review.opendev.org/#/c/668765/

Change-Id: I91e5c1840ace8f567daf462c4eb3ec1f0c503823
Implements: blueprint ansible-pacemaker-support
Co-Authored-By: Radosław Piliszek <radoslaw.piliszek@gmail.com>
Co-Authored-By: Mark Goddard <mark@stackhpc.com>
2021-04-08 06:39:19 +00:00

26 lines
1.1 KiB
YAML

---
- name: Check hacluster containers
become: true
kolla_docker:
action: "compare_container"
common_options: "{{ docker_common_options }}"
name: "{{ service.container_name }}"
image: "{{ service.image | default(omit) }}"
volumes: "{{ service.volumes | default(omit) }}"
dimensions: "{{ service.dimensions | default(omit) }}"
volumes_from: "{{ service.volumes_from | default(omit) }}"
privileged: "{{ service.privileged | default(omit) }}"
cap_add: "{{ service.cap_add | default(omit) }}"
environment: "{{ service.environment | default(omit) }}"
ipc_mode: "{{ service.ipc_mode | default(omit) }}"
pid_mode: "{{ service.pid_mode | default(omit) }}"
security_opt: "{{ service.security_opt | default(omit) }}"
labels: "{{ service.labels | default(omit) }}"
command: "{{ service.command | default(omit) }}"
vars:
service_name: "{{ item.key }}"
service: "{{ item.value }}"
with_dict: "{{ hacluster_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ service_name }} container"