c4b74f4801
In some cases it may be desirable to run libvirt daemon on the host. For example, when mixing host and container OS distributions. This change makes it possible to disable the nova_libvirt container, by setting kolla_enable_nova_libvirt_container to false. The stackhpc.libvirt-host role is used in order to install and configure a libvirt daemon on compute hosts when kolla_enable_nova_libvirt_container is false. Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/825357 Depends-On: https://review.opendev.org/c/openstack/kayobe-config-dev/+/829225 Depends-On: https://github.com/stackhpc/ansible-role-libvirt-host/pull/51 Story: 2009858 Task: 44495 Change-Id: I73fef63fb886a9d543d2f4231fb009523495edb3
48 lines
1.7 KiB
YAML
48 lines
1.7 KiB
YAML
---
|
|
- name: Prepare
|
|
hosts: all
|
|
gather_facts: false
|
|
tasks:
|
|
- name: Ensure ironic inspector kernel and ramdisk image directory exists
|
|
local_action:
|
|
module: file
|
|
path: "{{ item | dirname }}"
|
|
state: directory
|
|
recurse: true
|
|
with_items:
|
|
- "{{ kolla_inspector_ipa_kernel_path }}"
|
|
- "{{ kolla_inspector_ipa_ramdisk_path }}"
|
|
|
|
# NOTE(mgoddard): Previously we were creating empty files for the kernel
|
|
# and ramdisk, but this was found to cause ansible to hang on recent
|
|
# versions of docker. Using non-empty files seems to resolve the issue.
|
|
# See https://github.com/ansible/ansible/issues/36725.
|
|
- name: Ensure ironic inspector kernel and ramdisk images exist
|
|
local_action:
|
|
module: copy
|
|
content: fake image
|
|
dest: "{{ item }}"
|
|
with_items:
|
|
- "{{ kolla_inspector_ipa_kernel_path }}"
|
|
- "{{ kolla_inspector_ipa_ramdisk_path }}"
|
|
|
|
- name: Ensure nova libvirt certificates directory exists
|
|
local_action:
|
|
module: file
|
|
path: "{{ kolla_nova_libvirt_certificates_src }}"
|
|
state: directory
|
|
|
|
# NOTE(mgoddard): Previously we were creating empty files for the kernel
|
|
# and ramdisk, but this was found to cause ansible to hang on recent
|
|
# versions of docker. Using non-empty files seems to resolve the issue.
|
|
# See https://github.com/ansible/ansible/issues/36725.
|
|
- name: Ensure nova libvirt certificates exist
|
|
local_action:
|
|
module: copy
|
|
content: fake cert
|
|
dest: "{{ kolla_nova_libvirt_certificates_src }}/{{ item }}"
|
|
with_items:
|
|
- "cacert.pem"
|
|
- "clientcert.pem"
|
|
- "clientkey.pem"
|