diff --git a/playbooks/roles/bifrost-create-vm-nodes/defaults/required_defaults_CentOS.yml b/playbooks/roles/bifrost-create-vm-nodes/defaults/required_defaults_CentOS.yml index 6361fdd31..d16980c9f 100644 --- a/playbooks/roles/bifrost-create-vm-nodes/defaults/required_defaults_CentOS.yml +++ b/playbooks/roles/bifrost-create-vm-nodes/defaults/required_defaults_CentOS.yml @@ -19,7 +19,6 @@ required_packages: - libvirt-daemon-driver-secret - libvirt-daemon-driver-storage - libvirt-daemon-kvm - - pkgconfig - - libvirt-devel + - python3-libvirt - edk2-ovmf test_vm_emulator: "/usr/libexec/qemu-kvm" diff --git a/playbooks/roles/bifrost-create-vm-nodes/defaults/required_defaults_Fedora.yml b/playbooks/roles/bifrost-create-vm-nodes/defaults/required_defaults_Fedora.yml index 961195ef6..992f814e7 100644 --- a/playbooks/roles/bifrost-create-vm-nodes/defaults/required_defaults_Fedora.yml +++ b/playbooks/roles/bifrost-create-vm-nodes/defaults/required_defaults_Fedora.yml @@ -9,7 +9,6 @@ required_packages: - libvirt - libvirt-client - libvirt-daemon - - pkgconfig - - libvirt-devel + - python3-libvirt - python3-libselinux - edk2-ovmf diff --git a/playbooks/roles/bifrost-create-vm-nodes/defaults/required_defaults_RedHat.yml b/playbooks/roles/bifrost-create-vm-nodes/defaults/required_defaults_RedHat.yml index 813fb01c0..605745b83 100644 --- a/playbooks/roles/bifrost-create-vm-nodes/defaults/required_defaults_RedHat.yml +++ b/playbooks/roles/bifrost-create-vm-nodes/defaults/required_defaults_RedHat.yml @@ -12,8 +12,7 @@ required_packages: - libvirt - libvirt-client - libvirt-daemon - - pkgconfig - - libvirt-devel + - python3-libvirt - libxslt-devel - libxml2-devel - edk2-ovmf diff --git a/playbooks/roles/bifrost-create-vm-nodes/tasks/prepare_libvirt.yml b/playbooks/roles/bifrost-create-vm-nodes/tasks/prepare_libvirt.yml index a6f516420..c4ca4971b 100644 --- a/playbooks/roles/bifrost-create-vm-nodes/tasks/prepare_libvirt.yml +++ b/playbooks/roles/bifrost-create-vm-nodes/tasks/prepare_libvirt.yml @@ -22,16 +22,22 @@ - default_boot_mode != 'uefi' - test_vm_secure_boot | bool -- name: install libvirt-python, gunicorn and lxml +- name: install gunicorn and lxml include_role: name: bifrost-pip-install vars: package: "{{ item }}" loop: - - libvirt-python - gunicorn - lxml +- name: install libvirt-python if needed + include_role: + name: bifrost-pip-install + vars: + package: libvirt-python + when: ansible_os_family != 'RedHat' + - name: configure libvirt log filters for qemu blockinfile: path: /etc/libvirt/libvirtd.conf @@ -161,6 +167,15 @@ path: "{{ test_vm_logdir | dirname }}" mode: "0755" +# NOTE(dtantsur): pypi version can easily get out of sync, we need to use +# the version from the distribution. +- name: edit libvirt-python out of upper constraints + lineinfile: + path: "{{ upper_constraints_file }}" + regexp: "^libvirt\\-python" + state: absent + when: ansible_os_family == 'RedHat' + - name: install virtualbmc include_role: name: bifrost-pip-install