File tree Expand file tree Collapse file tree 3 files changed +13
-5
lines changed Expand file tree Collapse file tree 3 files changed +13
-5
lines changed Original file line number Diff line number Diff line change 8
8
regexp : ' ^unix_sock_dir ='
9
9
line : unix_sock_dir = "{{ libvirt_host_socket_dir }}"
10
10
become : true
11
- when : libvirt_host_socket_dir != ""
11
+ when : libvirt_host_socket_dir | length > 0
12
12
notify : restart libvirt
13
13
14
14
- name : Create directory for libvirt socket
19
19
group : root
20
20
mode : 0755
21
21
become : true
22
- when : libvirt_host_socket_dir != ""
22
+ when : libvirt_host_socket_dir | length > 0
23
23
24
24
- name : Process lineinfile rules
25
25
lineinfile : " {{ rule.args }}"
Original file line number Diff line number Diff line change 14
14
15
15
- name : Ensure libvirt packages are installed
16
16
package :
17
- name : " {{ item }}"
17
+ name : " {{ libvirt_host_libvirt_packages }}"
18
18
state : installed
19
- with_items : " {{ libvirt_host_libvirt_packages }}"
19
+ register : result
20
+ until : result is success
21
+ retries : 3
20
22
become : True
21
23
22
24
# NOTE: QEMU emulators are available in EPEL.
23
25
- name : Ensure the EPEL repository is enabled
24
26
yum :
25
27
name : epel-release
26
28
state : installed
29
+ register : result
30
+ until : result is success
31
+ retries : 3
27
32
become : True
28
33
when :
29
34
- ansible_os_family == "RedHat"
34
39
name : " {{ package }}"
35
40
state : installed
36
41
with_items : " {{ libvirt_host_qemu_emulators }}"
42
+ register : result
43
+ until : result is success
44
+ retries : 3
37
45
become : True
38
46
vars :
39
47
package : " qemu-system-{{ item }}"
Original file line number Diff line number Diff line change 4
4
- name : gather os specific variables
5
5
include_vars : " {{ item }}"
6
6
with_first_found :
7
- - " {{ ansible_distribution }}-{{ ansible_distribution_major_version}}.yml"
7
+ - " {{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml"
8
8
- " {{ ansible_distribution }}.yml"
9
9
- " {{ ansible_os_family }}.yml"
10
10
tags : vars
You can’t perform that action at this time.
0 commit comments