kolla-ansible/tools/setup-compute-libvirt.yml
Martin Hiner 53e8b80ed3 Add container engine option to scripts
This patch add a way to choose container engine inside tool and test
scripts. This is in preparation for Podman introduction but still
leaves Docker as default container engine.

Signed-off-by: Martin Hiner <m.hiner@partner.samsung.com>
Change-Id: I395d2bdb0dfb4b325b6ad197c8893c8a0f768324
2023-04-28 16:16:55 +02:00

25 lines
760 B
YAML

# This playbook modifies the system shutdown sequence to ensure that
# nova-compute is shutdown safely, including guests, when used in
# conjunction with systemd-machined and libvirt.
---
- name: Set up compute libvirts to shutdown guests safely
hosts: compute
become: true
vars:
systemd_artifacts:
- "kolla-libvirt-guests-{{ container_engine }}.service"
- virt-guest-shutdown.target
tasks:
- name: Install systemd artifacts
copy:
src: "{{ item }}"
dest: "/usr/lib/systemd/system/{{ item }}"
with_items: "{{ systemd_artifacts }}"
- name: Enable/start systemd artifacts
systemd:
enabled: yes
state: started
name: "{{ item }}"
with_items: "{{ systemd_artifacts }}"