From b02a8c40c76cb2e61c7a664ec156407101201a24 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Wed, 25 Jan 2023 14:40:44 +0100 Subject: move tool existence conditionals to role common --- roles/pacman/meta/main.yml | 4 ++-- roles/pacman/tasks/main.yml | 9 +-------- 2 files changed, 3 insertions(+), 10 deletions(-) (limited to 'roles/pacman') diff --git a/roles/pacman/meta/main.yml b/roles/pacman/meta/main.yml index 3a79dd0..f9d9a85 100644 --- a/roles/pacman/meta/main.yml +++ b/roles/pacman/meta/main.yml @@ -1,4 +1,4 @@ dependencies: - role: common - - role: etckeeper - - role: rate_mirrors + - {role: etckeeper, when: etc_versioned} + - {role: rate_mirrors, when: has_rate_mirrors} diff --git a/roles/pacman/tasks/main.yml b/roles/pacman/tasks/main.yml index acd2d31..1669920 100644 --- a/roles/pacman/tasks/main.yml +++ b/roles/pacman/tasks/main.yml @@ -1,11 +1,4 @@ -- name: Check if pacman is installed - command: pacman --version - register: pacman_version - changed_when: false - failed_when: false - -- when: pacman_version.rc == 0 - become: true +- become: true block: - name: Upgrade packages community.general.pacman: -- cgit v1.2.3