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') }}"
|
state: "{{ item.condition | default(False) | ternary('started', 'stopped') }}"
|
||||||
enabled: "{{ item.condition | default(False) }}"
|
enabled: "{{ item.condition | default(False) }}"
|
||||||
masked: no
|
masked: no
|
||||||
when:
|
|
||||||
- libvirtd_version is version('5.7', '>=')
|
|
||||||
with_items:
|
with_items:
|
||||||
- name: libvirtd-tls.socket
|
- name: libvirtd-tls.socket
|
||||||
condition: "{{ nova_libvirtd_listen_tls | bool }}"
|
condition: "{{ nova_libvirtd_listen_tls | bool }}"
|
||||||
|
@ -21,25 +21,6 @@
|
|||||||
tags:
|
tags:
|
||||||
- always
|
- 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
|
- name: Set nested kvm virt
|
||||||
copy:
|
copy:
|
||||||
src: kvm.conf
|
src: kvm.conf
|
||||||
@ -112,22 +93,6 @@
|
|||||||
- nova-kvm
|
- nova-kvm
|
||||||
- nova-libvirt
|
- 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)
|
- name: Unset libvirt runtime options (Ubuntu)
|
||||||
lineinfile:
|
lineinfile:
|
||||||
dest: "/etc/default/libvirtd"
|
dest: "/etc/default/libvirtd"
|
||||||
@ -135,7 +100,6 @@
|
|||||||
regexp: "^libvirtd_opts="
|
regexp: "^libvirtd_opts="
|
||||||
backup: "yes"
|
backup: "yes"
|
||||||
when:
|
when:
|
||||||
- (nova_libvirtd_listen_tcp == 0 and nova_libvirtd_listen_tls == 0) or libvirtd_version is version('5.7', '>=')
|
|
||||||
- ansible_facts['pkg_mgr'] == 'apt'
|
- ansible_facts['pkg_mgr'] == 'apt'
|
||||||
notify: Restart libvirt-bin
|
notify: Restart libvirt-bin
|
||||||
tags:
|
tags:
|
||||||
@ -143,22 +107,6 @@
|
|||||||
- nova-kvm
|
- nova-kvm
|
||||||
- nova-libvirt
|
- 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)
|
- name: Unset libvirt runtime options (RPM)
|
||||||
lineinfile:
|
lineinfile:
|
||||||
dest: "/etc/sysconfig/libvirtd"
|
dest: "/etc/sysconfig/libvirtd"
|
||||||
@ -166,7 +114,6 @@
|
|||||||
regexp: "^(#)?LIBVIRTD_ARGS=*"
|
regexp: "^(#)?LIBVIRTD_ARGS=*"
|
||||||
backup: "yes"
|
backup: "yes"
|
||||||
when:
|
when:
|
||||||
- (nova_libvirtd_listen_tcp == 0 and nova_libvirtd_listen_tls == 0) or libvirtd_version is version('5.7', '>=')
|
|
||||||
- ansible_facts['pkg_mgr'] == 'dnf'
|
- ansible_facts['pkg_mgr'] == 'dnf'
|
||||||
notify: Restart libvirt-bin
|
notify: Restart libvirt-bin
|
||||||
tags:
|
tags:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user