diff --git a/handlers/main.yml b/handlers/main.yml index ee06a198..99a34261 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -15,12 +15,14 @@ - name: Stop libvirt-bin service: - name: "{{ libvirt_service_name }}" + name: "{{ item }}" enabled: yes state: "stopped" listen: - Restart libvirt-bin - "cert installed" + with_items: + - "{{ libvirt_service_name }}" when: - "'nova_compute' in group_names" - nova_virt_type != 'ironic' @@ -43,9 +45,11 @@ - name: Start libvirt-bin service: - name: "{{ libvirt_service_name }}" + name: "{{ item }}" enabled: yes state: "started" + with_items: + - "{{ libvirt_service_name }}" listen: - Restart libvirt-bin - "cert installed" diff --git a/tasks/drivers/kvm/nova_compute_kvm_install.yml b/tasks/drivers/kvm/nova_compute_kvm_install.yml index 34e4216d..57607262 100644 --- a/tasks/drivers/kvm/nova_compute_kvm_install.yml +++ b/tasks/drivers/kvm/nova_compute_kvm_install.yml @@ -15,8 +15,9 @@ - name: Make sure libvirt is started service: - name: "{{ libvirt_service_name }}" + name: "{{ item }}" state: "started" + with_items: "{{ libvirt_service_name }}" - name: Check the state of the default qemu save directory stat: diff --git a/vars/debian.yml b/vars/debian.yml index 7b438e69..ee5c5c1f 100644 --- a/vars/debian.yml +++ b/vars/debian.yml @@ -17,7 +17,9 @@ cache_timeout: 600 libvirt_group: libvirt -libvirt_service_name: libvirtd +libvirt_service_name: + - libvirtd.socket + - libvirtd.service # Common apt packages nova_distro_packages: diff --git a/vars/redhat-9.yml b/vars/redhat-9.yml index 19c73bec..8861bf1c 100644 --- a/vars/redhat-9.yml +++ b/vars/redhat-9.yml @@ -16,7 +16,9 @@ nova_qemu_user: qemu nova_qemu_group: qemu libvirt_group: libvirt -libvirt_service_name: libvirtd +libvirt_service_name: + - libvirtd.socket + - libvirtd.service # Common yum packages nova_distro_packages: diff --git a/vars/redhat.yml b/vars/redhat.yml index da50e2f3..cd51aa8b 100644 --- a/vars/redhat.yml +++ b/vars/redhat.yml @@ -16,7 +16,9 @@ nova_qemu_user: qemu nova_qemu_group: qemu libvirt_group: libvirt -libvirt_service_name: libvirtd +libvirt_service_name: + - libvirtd.socket + - libvirtd.service # Common yum packages nova_distro_packages: