Skip to content

Commit e61bbc3

Browse files
authored
Merge pull request #10 from stackhpc/lint
Fix lint issues
2 parents 0f10691 + 3dd8584 commit e61bbc3

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

tasks/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
regexp: '^unix_sock_dir ='
99
line: unix_sock_dir = "{{ libvirt_host_socket_dir }}"
1010
become: true
11-
when: libvirt_host_socket_dir != ""
11+
when: libvirt_host_socket_dir | length > 0
1212
notify: restart libvirt
1313

1414
- name: Create directory for libvirt socket
@@ -19,7 +19,7 @@
1919
group: root
2020
mode: 0755
2121
become: true
22-
when: libvirt_host_socket_dir != ""
22+
when: libvirt_host_socket_dir | length > 0
2323

2424
- name: Process lineinfile rules
2525
lineinfile: "{{ rule.args }}"

tasks/install.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,21 @@
1414

1515
- name: Ensure libvirt packages are installed
1616
package:
17-
name: "{{ item }}"
17+
name: "{{ libvirt_host_libvirt_packages }}"
1818
state: installed
19-
with_items: "{{ libvirt_host_libvirt_packages }}"
19+
register: result
20+
until: result is success
21+
retries: 3
2022
become: True
2123

2224
# NOTE: QEMU emulators are available in EPEL.
2325
- name: Ensure the EPEL repository is enabled
2426
yum:
2527
name: epel-release
2628
state: installed
29+
register: result
30+
until: result is success
31+
retries: 3
2732
become: True
2833
when:
2934
- ansible_os_family == "RedHat"
@@ -34,6 +39,9 @@
3439
name: "{{ package }}"
3540
state: installed
3641
with_items: "{{ libvirt_host_qemu_emulators }}"
42+
register: result
43+
until: result is success
44+
retries: 3
3745
become: True
3846
vars:
3947
package: "qemu-system-{{ item }}"

tasks/prelude.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
- name: gather os specific variables
55
include_vars: "{{ item }}"
66
with_first_found:
7-
- "{{ ansible_distribution }}-{{ ansible_distribution_major_version}}.yml"
7+
- "{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml"
88
- "{{ ansible_distribution }}.yml"
99
- "{{ ansible_os_family }}.yml"
1010
tags: vars

0 commit comments

Comments
 (0)