Drop libvirtd_version identification
Since all supported distros have libvirt version >= 5.7 there's no reason to ensure that it is true. So we remove corresponsive code and simplify logic. Change-Id: I281829214df8affec7774a45a3ca0405a866b5c0
This commit is contained in:
parent
7589b7b66b
commit
9bd0e45d1f
@ -31,8 +31,6 @@
|
||||
state: "{{ item.condition | default(False) | ternary('started', 'stopped') }}"
|
||||
enabled: "{{ item.condition | default(False) }}"
|
||||
masked: no
|
||||
when:
|
||||
- libvirtd_version is version('5.7', '>=')
|
||||
with_items:
|
||||
- name: libvirtd-tls.socket
|
||||
condition: "{{ nova_libvirtd_listen_tls | bool }}"
|
||||
|
@ -21,25 +21,6 @@
|
||||
tags:
|
||||
- always
|
||||
|
||||
- name: Check libvirtd version
|
||||
command: "libvirtd --version"
|
||||
register: _libvirtd_version_cmd
|
||||
changed_when: false
|
||||
tags:
|
||||
- nova-install
|
||||
- nova-config
|
||||
- nova-kvm
|
||||
- nova-libvirt
|
||||
|
||||
- name: Set libvirtd version
|
||||
set_fact:
|
||||
libvirtd_version: "{{ _libvirtd_version_cmd['stdout'].split()[-1] }}"
|
||||
tags:
|
||||
- nova-install
|
||||
- nova-config
|
||||
- nova-kvm
|
||||
- nova-libvirt
|
||||
|
||||
- name: Set nested kvm virt
|
||||
copy:
|
||||
src: kvm.conf
|
||||
@ -112,22 +93,6 @@
|
||||
- nova-kvm
|
||||
- nova-libvirt
|
||||
|
||||
- name: Set libvirt runtime options (Ubuntu)
|
||||
lineinfile:
|
||||
dest: "/etc/default/libvirtd"
|
||||
line: 'libvirtd_opts="-l"'
|
||||
regexp: "^libvirtd_opts="
|
||||
backup: "yes"
|
||||
when:
|
||||
- (nova_libvirtd_listen_tcp == 1) or (nova_libvirtd_listen_tls == 1)
|
||||
- libvirtd_version is version('5.7', '<')
|
||||
- ansible_facts['pkg_mgr'] == 'apt'
|
||||
notify: Restart libvirt-bin
|
||||
tags:
|
||||
- nova-config
|
||||
- nova-kvm
|
||||
- nova-libvirt
|
||||
|
||||
- name: Unset libvirt runtime options (Ubuntu)
|
||||
lineinfile:
|
||||
dest: "/etc/default/libvirtd"
|
||||
@ -135,7 +100,6 @@
|
||||
regexp: "^libvirtd_opts="
|
||||
backup: "yes"
|
||||
when:
|
||||
- (nova_libvirtd_listen_tcp == 0 and nova_libvirtd_listen_tls == 0) or libvirtd_version is version('5.7', '>=')
|
||||
- ansible_facts['pkg_mgr'] == 'apt'
|
||||
notify: Restart libvirt-bin
|
||||
tags:
|
||||
@ -143,22 +107,6 @@
|
||||
- nova-kvm
|
||||
- nova-libvirt
|
||||
|
||||
- name: Set libvirt runtime options (RPM)
|
||||
lineinfile:
|
||||
dest: "/etc/sysconfig/libvirtd"
|
||||
line: 'LIBVIRTD_ARGS="-l"'
|
||||
regexp: "^(#)?LIBVIRTD_ARGS=*"
|
||||
backup: "yes"
|
||||
when:
|
||||
- (nova_libvirtd_listen_tcp == 1) or (nova_libvirtd_listen_tls == 1)
|
||||
- libvirtd_version is version('5.7', '<')
|
||||
- ansible_facts['pkg_mgr'] == 'dnf'
|
||||
notify: Restart libvirt-bin
|
||||
tags:
|
||||
- nova-config
|
||||
- nova-kvm
|
||||
- nova-libvirt
|
||||
|
||||
- name: Unset libvirt runtime options (RPM)
|
||||
lineinfile:
|
||||
dest: "/etc/sysconfig/libvirtd"
|
||||
@ -166,7 +114,6 @@
|
||||
regexp: "^(#)?LIBVIRTD_ARGS=*"
|
||||
backup: "yes"
|
||||
when:
|
||||
- (nova_libvirtd_listen_tcp == 0 and nova_libvirtd_listen_tls == 0) or libvirtd_version is version('5.7', '>=')
|
||||
- ansible_facts['pkg_mgr'] == 'dnf'
|
||||
notify: Restart libvirt-bin
|
||||
tags:
|
||||
|
Loading…
Reference in New Issue
Block a user