From 98c8bcd181354acea22437cd852e50a885521df5 Mon Sep 17 00:00:00 2001 From: surtur Date: Thu, 27 Jul 2023 16:33:18 +0200 Subject: [PATCH] ansible: don't install pkgs using loop --- ansible/roles/common/tasks/pkg.yml | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/ansible/roles/common/tasks/pkg.yml b/ansible/roles/common/tasks/pkg.yml index 85fac9e..6eb03f1 100644 --- a/ansible/roles/common/tasks/pkg.yml +++ b/ansible/roles/common/tasks/pkg.yml @@ -3,32 +3,28 @@ become: true ansible.builtin.package: state: present - name: "{{ item }}" - loop: "{{ pkgs_common }}" + name: "{{ pkgs_common }}" - name: Arch pkgs become: true community.general.pacman: state: present - name: "{{ item }}" - loop: "{{ pkgs_arch }}" + name: "{{ pkgs_arch }}" when: ansible_distribution == "Archlinux" - name: F38 pkgs become: true ansible.builtin.dnf: state: present - name: "{{ item }}" - loop: "{{ pkgs_fedora38 }}" + name: "{{ pkgs_fedora38 }}" when: ansible_distribution == "Fedora" - name: Remove cockpit become: true ansible.builtin.dnf: state: absent - name: "{{ item }}" - loop: - - cockpit - - cockpit-bridge - - cockpit-ws + name: + - cockpit + - cockpit-bridge + - cockpit-ws when: ansible_distribution == "Fedora"