linter fixes

This commit is contained in:
Guido Grazioli
2023-12-01 12:36:20 +01:00
parent 5e8e8c67e8
commit d6f020ab44
40 changed files with 212 additions and 220 deletions

View File

@@ -2,15 +2,15 @@
- name: "Check if packages are already installed" # noqa command-instead-of-module this runs faster
ansible.builtin.command: "rpm -q {{ packages_list | join(' ') }}"
register: rpm_info
changed_when: False
failed_when: False
changed_when: false
failed_when: false
- name: "Add missing packages to the yum install list"
ansible.builtin.set_fact:
packages_to_install: "{{ packages_to_install | default([]) + rpm_info.stdout_lines | map('regex_findall', 'package (.+) is not installed$') | default([]) | flatten }}"
- name: "Install packages: {{ packages_to_install }}"
become: True
become: true
ansible.builtin.yum:
name: "{{ packages_to_install }}"
state: present