Drop deprecated builtin.command arg

This commit is contained in:
Guido Grazioli 2022-12-13 11:39:57 +01:00
parent 3d0cfc9e42
commit b3b016bf3b
No known key found for this signature in database
GPG key ID: 22C8C31EF2BC093B
2 changed files with 2 additions and 6 deletions

View file

@ -3,8 +3,6 @@
block:
- name: "Check if packages are already installed"
ansible.builtin.command: "rpm -q {{ packages_list | join(' ') }}"
args:
warn: no
register: rpm_info
changed_when: rpm_info.failed
@ -19,4 +17,4 @@
ansible.builtin.yum:
name: "{{ packages_to_install }}"
state: present
when: packages_to_install | default([]) | length > 0
when: packages_to_install | default([]) | length > 0

View file

@ -3,8 +3,6 @@
block:
- name: "Check if packages are already installed"
ansible.builtin.command: "rpm -q {{ packages_list | join(' ') }}"
args:
warn: no
register: rpm_info
changed_when: rpm_info.failed
@ -19,4 +17,4 @@
ansible.builtin.yum:
name: "{{ packages_to_install }}"
state: present
when: packages_to_install | default([]) | length > 0
when: packages_to_install | default([]) | length > 0